fix(fuse): skip unreadable folders in sync, never evict local-only files

An unreadable subfolder, such as a container's root-owned cache, failed
every pass of its synced folder, so nothing else in the tree reached
Drive (#33, B196). The scan now leaves such a path out, together with an
entry that vanished mid-scan and a name that is not UTF-8, and the pass
drops everything under it from classification, the wipe guard and the
push pass's deletions. It is never read as deleted and never downloaded
into. An unreadable or absent root still fails the pass. The activity
feed names unreadable paths once each time the set changes.

Two related bugs on the way to online-only:

- The push pass read deletions from the raw baseline, so a synced path
  that later became ignored was trashed on Drive (B197).
- The switch evicted everything once the folder was idle, including
  ignored paths such as .git/, symlinks, unreadable folders and files
  changed after the pass, none of which are on Drive (B198). It now
  refuses and names the path.

Closes #33
This commit is contained in:
nvrl committed 2026-10-08 20:45:54 +02:00
1 parent c0d211238b
commit 7eb6aa0640
10 files changed
+778 -102

No files matched your search

+4 -2
View File
@@ -310,8 +310,10 @@ its changes go through the queue like My files.
A filesystem watcher (`notify`) and a remote poll every 120 s feed a debounced pass (2 s, at most
30 s). Passes are serialized per daemon. A pass:
1. **Walks the local tree.** Any `readdir`, metadata or permission failure marks the scan
incomplete, and an incomplete scan cannot delete anything.
1. **Walks the local tree.** A path the user may not read, an entry that vanishes mid-scan and a
name that is not UTF-8 are left out, and the pass drops everything under them, as it drops
ignored paths, so a left-out path is never read as deleted. An unreadable root and any other
I/O error fail the pass.
2. **Walks the remote tree.**
3. **Loads the baseline**, the `sync_entry` rows: both sides as of the last successful pass.
4. **Classifies each path** by comparing local, remote and baseline, with `(mtime, size)` as the