Missing atomic file writes on receiver (write-then-rename) #102
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Files are written directly to their final path via
to_disk(). If the transfer is interrupted, partial files remain. While--partialkeeps them for resume, non-partial mode should write to a temp file and rename atomically.Location
src/shared/file.c:562-596 (to_disk function)
Suggested Fix
Modify
to_disk()to write to<path>.fastsync-tmpthenrename()atomically. Only skip this if--partialis set (since partial files need to stay at the expected path for resume).Severity
medium
Category
feature
Sub-Agent
feature-scout (FS-8)
This issue was automatically generated by the issue-creator agent.
Fixed in PR #148 — merged into main on 2026-07-29.