[Geany-Devel] Simplifying file saving options
techet at xxxxx
Wed Aug 19 09:48:40 UTC 2015
after some time spent debugging
I think the file saving options are a bit confusing and misleading and
should be simplified.
1. Both g_file_set_contents() and g_file_replace_contents() do absolutely
the same thing (saving to temporary file, then renaming the file), the only
difference is the first uses POSIX calls while the second GIO. The
use_gio_unsafe_file_saving name is very confusing because it's not unsafe
in any way.
2. It is now possible to set
and to users it's unclear which of the options will be actually used (it's
the use_atomic_file_saving case because it's checked first in the code).
3. The fallback "ordinary" file saving when
doesn't bring any benefit compared to the two above - it's similar to
use_atomic_file_saving=true in using POSIX calls, it's just a bit less safe
because it writes directly to the file without the renaming. The GIO
g_file_replace_contents() recreates the file's permissions/ownership
I would suggest removing the file saving option mentioned in (3) above and
have just a single settings option like
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Devel