mirror of
https://github.com/narrrl/proton-drive-linux.git
synced 2026-11-11 09:17:05 +01:00
Mirror folders walked and uploaded every path under their root, so syncing a project directory pushed node_modules/, target/, and .git/ to Drive -- quota spent on files nobody wants there, and enough API traffic to invite rate limiting. Rules come from a .pdfsignore (or .protonignore) at the folder root, unioned with an ignore_patterns list in config.json that defaults to the usual build, VCS, and editor-leftover globs. Both are re-read at the start of every pass, so edits apply without restarting the daemon. The filter deliberately sits on the classification union in classification_order(), not on walk_local alone. do_reconcile classifies local | remote | baseline, so a file synced before a rule started matching it is absent from local but present in the other two -- the "local deleted, remote untouched" arm, which calls trash_nodes. Filtering only the walk would have meant that adding a line to .pdfsignore silently trashed files on Drive on the next pass. Ignored baseline rows are left in place so un-ignoring re-adopts the existing remote file instead of re-uploading it. guard_local_wipe takes a filtered baseline for the same reason: an ignored path is absent from the walk by rule rather than by loss, and counting those as missing would trip the guard on every pass once a rule covered the tree, wedging that folder's sync permanently. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JFzNQyb4TWrCRWcnegqWxY
22 lines
631 B
Rust
22 lines
631 B
Rust
//! Core building blocks for the Proton Drive Linux client: static client
|
|
//! identity, XDG paths, and the login/session/keyring layer that every
|
|
//! front-end (CLI today, daemon + GUI later) shares.
|
|
|
|
pub mod auth;
|
|
pub mod cache;
|
|
pub mod config;
|
|
pub mod control;
|
|
pub mod db;
|
|
pub mod error;
|
|
pub mod localindex;
|
|
pub mod service;
|
|
pub mod shell;
|
|
pub mod syncignore;
|
|
|
|
pub use error::{CoreError, CoreResult, Error, Result};
|
|
|
|
// Re-export the SDK surface downstream crates need, so they depend on
|
|
// `pdfs-core` rather than pinning the SDK directly.
|
|
pub use proton_drive_rs::{self, Node, NodeKind, ProtonDriveClient};
|
|
pub use proton_sdk;
|