Files
Narasimha-sc 9b76742c6e desktop: fix in-app updater deleting the download before "Open file location" (#7104)
* desktop: fix updater deleting the download before "Open file location"

The in-app updater downloads to a temp UUID file via createTmpFileAndDelete,
then relies on `file.renameTo(newFile)` to move the bytes to the asset name so
they survive that helper's `finally { tmpFile.delete() }`. The rename's return
value was ignored: if it failed, the bytes stayed at the UUID path and the
finally block deleted the only copy, so the "Download completed" dialog appeared
but "Open file location" opened an empty /tmp/simplex.

Use Files.move with REPLACE_EXISTING instead. It performs the same in-place
rename when possible (verified: inode preserved, no copy), falls back to
copy+delete when an atomic rename isn't possible, and throws on genuine failure
- which the existing outer catch handles - instead of silently losing the file.

* docs: plan for updater open-file-location fix

* docs: plan - note Whonix compatibility (updater previously failed there)
2026-06-20 22:49:29 +01:00
..