You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Avoid copying media twice on filesystems without hard links #236
When tg media download --out exports to a filesystem without hard links, it first writes the cached file to a temporary file next to the destination. After the link fails, it writes the same bytes a second time into the destination opened with wx. A large export can need nearly twice the file size in free space on the destination volume. Ctrl-C during the first copy waits for that copy to finish.
Make this path write the file contents once and respond to cancellation throughout the copy. Preserve the independent cached file, the no-overwrite guarantee, batch collision handling and atomic publication where the filesystem supports it. A partial public file on interruption should still be reported so the user can inspect it before replacing it.
Cover the no-hard-link path with offline tests for cancellation, identical and conflicting outputs, and the number of full-file writes. See the author’s final review of #181.
Activity