gphalkes / tilde

The Tilde text editor
395 stars 21 forks source link

Short-term fix for bug 'Tilde changes file ownership on save #28' #34

Closed jscavallo closed 6 years ago

jscavallo commented 6 years ago

For safety tilde prefers to double buffering file saves by creating a new temp file, then deleting the original file, then renaming the new file to the correct name. However this method changes the file owner to the current user writing the file. So now tilde skips the double buffer method if, and only if, the current user writing the file is not the owner of the file. It does a direct overwrite of the file instead. This is more risk of losing the file, but it does not change the file owner.

gphalkes commented 6 years ago

Thanks a lot for the fix!