Missing atomic file writes on receiver (write-then-rename) #102

Closed
opened 2026-07-21 16:20:06 +02:00 by TapTap · 1 comment
Owner

Description

Files are written directly to their final path via to_disk(). If the transfer is interrupted, partial files remain. While --partial keeps 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-tmp then rename() atomically. Only skip this if --partial is 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.

## Description Files are written directly to their final path via `to_disk()`. If the transfer is interrupted, partial files remain. While `--partial` keeps 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-tmp` then `rename()` atomically. Only skip this if `--partial` is 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._
Author
Owner

Fixed in PR #148 — merged into main on 2026-07-29.

Fixed in PR #148 — merged into main on 2026-07-29.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: TapTap/FastSync#102