I'm in Windows 7, running Geany 1.29, which I downloaded from http://download.geany.org/geany-1.29_setup.exe . When I save a file, previous Windows permissions for that file are lost. It seems the permissions afterwards probably always just inherit from the directory the file is in.
This is annoying when using Cygwin and its git. Any file saved by Geany is seen as executable by Cygwin, and then git would commit that change. I know I could `git config core.fileMode false`, but I shouldn't need to. Both Notepad and Notepad++ preserved permissions.
As explained [here](https://wiki.geany.org/config/all_you_never_wanted_to_know_about_file_saving) you probably have the `atomic_file_savig` permission on.
No, I did not have `use_atomic_file_saving` on. However, I did have `use_gio_unsafe_file_saving` on. [The page you linked](https://wiki.geany.org/config/all_you_never_wanted_to_know_about_file_saving) says that is on by default. Turning off `use_gio_unsafe_file_saving` fixes the problem, as it should, because the page says this results in simple overwrite file saving.
According to that page, `use_gio_unsafe_file_saving` does attempt to retain "metadata" but apparently that doesn't work for Windows permissions.
I'm okay with my current configuration now. I don't like that the default configuration fails to preserve permissions, but feel free to close this issue if you don't think it is a bug. Maybe it should be considered a gio library bug instead?
@dreamlayers as someone once said "who knew it was so hard to simply write a file", especially portably safely and performantly on different systems with different capabilities. The default is `use_gio_unsafe_file_saving` because it works in the most cases including mixed systems writing across networks.
But its not perfect which is why there are the other options.
The wiki was based on what GIO did when it was written, that may have changed.
Closing since the issue was resolved using existing capabilities (however imperfect).
Closed #1420.
github-comments@lists.geany.org