`geany 2.0 (built on Oct 23 2023 with GTK 3.24.38, GLib 2.78.0)`
`6.6.9-arch1-1`
I use geany for writing python scripts. During development I'll run the file through Geany's run function.
To run from the command line I'll set the x bit
chmod +x test.py
It will run.
If I make a change to that file through Geany. The executable bit is removed.
Watching the directory for gremlins I notice that geany (I assume) is writing to a temp file with a UID suffix. For example `test.py.A543B`
When I next try to run `test.py` I need to reset the permissions.
Is it just me?
https://wiki.geany.org/config/all_you_never_wanted_to_know_about_file_saving
Ah HA!
use_atomic_file_saving ... Disadvantages: ... Because it writes the temporary file as a new file, it will get the permissions and other metadata (eg execute) of a new file, not those of the old file.
Thank you.
Closed #3737 as completed.
You did notice that either of the other saving methods should keep the x bit at the cost of loss of guaranteed atomicity?
I did not. Is there something I should be thinking about. Other than posting to a remote git, I work on local files and save often so I'm not concerned about atomicity really -- but maybe I'm missing something.
Well the default is `use_gio_unsafe_file_saving` so we endorse it in most cases, precisely because it handles metadata and Windows filesystems that won't rename, so for most people it "just works" :smile:
The "unsafe" only applies when something goes wrong, which for local storage is either the device breaks, or the partition is full, both of which "should" be very rare (but some people seem to try to eke the last byte out their storage so maybe full is less rare). And so long as the loss of the device/partition doesn't stop the system or Geany the advice in the wiki applies, `don't panic` the buffer is still in memory, save it somewhere else eg a USB key.
github-comments@lists.geany.org