The default setting is use_gio_unsafe_file_saving which does the same as use_atomic_file_saving

Sadly, this is only true for saving documents which use

https://github.com/geany/geany/blob/eea0a25d5de5914f6dfef99776c7a73e29dc6b5f/src/document.c#L1927

and not for anything else like config files which use

https://github.com/geany/geany/blob/eea0a25d5de5914f6dfef99776c7a73e29dc6b5f/src/utils.c#L222

So for config files it's either fwrite() or g_file_set_contents() and not the GIO variant - and fwrite() is the default variant in this case because use_safe_file_saving is disabled by default and the GIO option is ignored.

and fixes the protections and handles MS file systems that can't rename in some circumstances, such as files on cheap file servers. So its best to leave it as is.

If this is the case, I think it would be best to add the GIO variant to utils_write_file() - or precisely, unify utils_write_file() and write_data_to_disk() so there's just one implementation of file saving.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <geany/geany/issues/3946/2345571565@github.com>