Commit graph

1 commit

Author SHA1 Message Date
Deivid Soto
271413e0f9 fix(usenet): fsync delivered files before reporting complete
Symmetric hardening with the debrid fix (2026-06-15 NFS write-back race):
the prod download dir is a network mount and usenet post-processing reads
files back for par2 from the page cache while the write-back to the server
can still lag. A later open (organize/stream/ffprobe) would then see a
short file. fsync the delivered file (or every regular file in a multi-file
release directory) and surface any write-back error before returning.

Also report the real content size for directory deliveries (walk instead
of the dir inode size) and fail an empty delivery.

Add syncTree/syncFile + tests.
2026-06-15 17:21:17 +02:00