Skip to content

Fix: Restore locally deleted files during sync - #258

Open
agonzalezreyes wants to merge 1 commit into
philips:mainfrom
agonzalezreyes:fix/sync-engine
Open

agonzalezreyes wants to merge 1 commit into
philips:mainfrom
agonzalezreyes:fix/sync-engine

Conversation

@agonzalezreyes

Copy link
Copy Markdown

Restore locally deleted files during sync: Previously, if a file's device copy hadn't changed but its vault copy had been deleted, sync would just flag it as unchanged (and potentially log it as a "skip-conflict" candidate) without ever re-downloading it.

This adds a pass after planSync that checks each "unchanged" listing's vault file: if it's missing (currentHash returns null), the listing is moved into the toSync set so it gets restored, instead of staying in the drift-check loop where a missing file was never actually recoverable.

No changes to deviceSync.ts's decision logic, this only re-partitions planSync's output in syncEngine.ts before acting on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant