mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-07-26 22:11:03 +02:00
8313f3c827
- All SAF downloads now write under a staged .partial name; the handler itself promotes to the final name for legacy callers (the foreground Dart queue), so a killed process can never leave a half-written file that the exists check then accepts as complete forever. Stale partials are removed before reuse since fd truncation is best-effort on some providers. - The exists-check/create/write/publish sequence is serialized per target file (tree URI + dir + name); two concurrent downloads that sanitize to the same display name can no longer interleave writes into one document — the second waits and dedupes via already_exists. - Replacing an existing final file now renames it aside and deletes it only after the staged copy holds the final name; a failed rename restores it instead of losing both copies. - The FFmpeg command pump always delivers a result for every claimed command id, including on exception or cancellation; previously a cancel mid-command stranded the Go post-processing call forever with the finalizer thread blocked inside it.