fix(fuse): stop a sync pass when nearly all of a large folder vanishes

The wipe guards refused a pass only when every synced path was missing
on one side. One surviving file cleared them, so a half-mounted disk,
a restored backup that brought back one file, or a script that emptied
the folder and wrote one back made the next pass trash everything else
on Drive, and on every computer syncing the folder (B270).

Both guards now also refuse when nine in ten or more of the tracked
paths of a folder with at least 20 are missing at once. A smaller
folder still stops only on a total loss, since an ordinary cleanup can
delete most of it. The reason now gives the count.

B270 stays partly fixed: a smaller loss still goes through, and the
app does not yet offer to confirm the deletions.
This commit is contained in:
nvrl committed 2026-11-01 16:06:08 +01:00
1 parent 506a610273
commit 129ad1a50d
5 files changed
+102 -23

No files matched your search

+7
View File
@@ -20,6 +20,13 @@ scratch (user data in `staging/` and `recovery/` is never touched by this).
files in it. **After upgrading:** if your `~/ProtonDrive` has files underneath, for example
saved there while the service was stopped, My files does not open until you move them out.
- **A synced folder stops instead of deleting when nearly all of it vanishes at once** (B270).
The guard against a lost folder, such as a disk that is not mounted, stopped a pass only when
every synced file was gone. One file left over was enough to clear it, and the next pass
trashed everything else on Proton Drive, and on every other computer syncing the folder. A
folder with 20 or more files and folders now also stops when nine in ten of them are missing,
on this computer or on Proton Drive. **Sync From Scratch…** brings them back.
- **A new file reads without the network as soon as `pdfs status` shows nothing queued**
(B257). A new file's upload counted as done before its bytes were cached, so a script that
waited for an empty queue and then went offline could not read it. A new file deleted while