Skip to content

Reworking how "file delete on sync" works#19

Draft
expede wants to merge 8 commits into
mainfrom
dont-delete
Draft

Reworking how "file delete on sync" works#19
expede wants to merge 8 commits into
mainfrom
dont-delete

Conversation

@expede
Copy link
Copy Markdown
Member

@expede expede commented Apr 19, 2026

Currently psuhwork updates files to the latest per-file state from .pushwork. This has several edge cases:

  • Cancelling a sync partway through may lead to deleted files on the next run
  • Corrupt storage / torn writes can lead to deleted files

This PR reworks the deletion strategy by:

  • Checking if the directory expects a file to be there
  • Syncing .pushwork before updating materialised files
  • Default to retaining the file if there's any .pushwork state ambiguity; we'll delete on next sync

@expede
Copy link
Copy Markdown
Member Author

expede commented Apr 19, 2026

Still very WIP

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