Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
config:all_you_never_wanted_to_know_about_file_saving [2019/05/28 05:20] – Emphasized that use_atomic_file_saving overrides use_gio_unsafe_file_saving vstepaniukconfig:all_you_never_wanted_to_know_about_file_saving [2025/02/22 21:46] (current) – Explicitly mention that use_atomic_file_saving loses links colombanw
Line 41: Line 41:
   * Uses Geany's own code so it can be modified.   * Uses Geany's own code so it can be modified.
  
-If use_atomic_file_saving is set, use_gio_file_saving is ignored and Geany will use an atomic file save method.  This means that the file is first written to a temporary file, then renamed to the existing file name.  On most file systems rename is atomic, that is it succeeds completely or nothing will change, especially on modern journalling systems.  This functionality is provided and maintained by the Glib library.+If use_atomic_file_saving is set, use_gio_unsafe_file_saving is ignored and Geany will use an atomic file save method.  This means that the file is first written to a temporary file, then renamed to the existing file name.  On most file systems rename is atomic, that is it succeeds completely or nothing will change, especially on modern journalling systems.  This functionality is provided and maintained by the Glib library.
  
 Advantages: Advantages:
Line 51: Line 51:
  
   * 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.   * 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.
 +  * Because of renaming over the old file rather than changing its content, if the old file was a symlink the link is lost and is replaced with a new file instead, leaving the link target untouched.
   * Does not work on all file systems since rename or rename over an existing file is not supported on all file systems.   * Does not work on all file systems since rename or rename over an existing file is not supported on all file systems.
   * Uses twice as much file space during the process.   * Uses twice as much file space during the process.
Line 95: Line 96:
 Disadvantages: Disadvantages:
  
-  * Only works if use_gio_unsafe_file_saving is in operation, **remember use_atomic_file_saving overrides it**.+  * Only works if ''use_gio_unsafe_file_saving'' is in enabled and ''use_atomic_file_saving'' is disabled (''use_atomic_file_saving'' **overrides** ''use_gio_unsafe_file_saving'').
   * Uses twice the disk space.   * Uses twice the disk space.
   * Can be slow on remote filesystems as it may have to read and write data to create the backup if renaming fails.   * Can be slow on remote filesystems as it may have to read and write data to create the backup if renaming fails.
Print/export