<p>Thank you</p>
<p><a href="https://github.com/codebrainz" class="user-mention">@codebrainz</a> I did not have that plugin enabled. Before I did those tests the existing  <code>.config/geany</code> folder was moved out of the way so geany could recreate the default settings.</p>
<p><a href="https://github.com/elextr" class="user-mention">@elextr</a> I totally misinterpreted your 3rd point then. To me it came across that gio would first use the atomic routine (even when not selected) and only try gio if the atomic is not able to recreate metadata.<br>
As for the permissions (linux only, all i get from my limited windows Powershell knowledge is <em>Full Access</em>):</p>
<ul>
<li>The umask on the directory used during the tests was: <code>0002</code>.</li>
<li>Permissions on the link are: <code>Access: (0777/lrwxrwxrwx)</code></li>
<li>Permissions on the target are <code>Access: (0664/-rw-rw-r--)</code></li>
<li>Permissions on the backup file are <code>Access: (0664/-rw-rw-r--)</code></li>
</ul>
<p>Derived from the comments in the Glib library I do believe that gio checks for and preserves the link.<br>
The writing routine <code>[geany]\documents.c::write_data_to_disk()</code> for atomic writes calls <code>[glib]\ gfileutils.c::g_file_set_contents()</code> this function warns about not preserving symlinks in the description.<br>
That same routine for gio writes calls <code>[glib]\gfile.c::g_file_replace_contents()</code> this function (and callees) do not warn about this.<br>
Hence my (weak) conclusion that by default gio will preserve symlinks.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/issues/1533#issuecomment-313860063">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJzewpBQu49czzdJb4Upn4iMWxN3rks5sL5bDgaJpZM4OOhiA">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJyltb1A9u6wCGsVO79sChk2lDmqHks5sL5bDgaJpZM4OOhiA.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany/issues/1533#issuecomment-313860063"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/geany/geany","title":"geany/geany","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/geany/geany"}},"updates":{"snippets":[{"icon":"PERSON","message":"@R1dO in #1533: Thank you\r\n\r\n@codebrainz I did not have that plugin enabled. Before I did those tests the existing  ``.config/geany`` folder was moved out of the way so geany could recreate the default settings.\r\n\r\n@elextr I totally misinterpreted your 3rd point then. To me it came across that gio would first use the atomic routine (even when not selected) and only try gio if the atomic is not able to recreate metadata.\r\nAs for the permissions (linux only, all i get from my limited windows Powershell knowledge is *Full Access*):\r\n* The umask on the directory used during the tests was: ``0002``.\r\n* Permissions on the link are: ``Access: (0777/lrwxrwxrwx)``\r\n* Permissions on the target are ``Access: (0664/-rw-rw-r--)``\r\n* Permissions on the backup file are ``Access: (0664/-rw-rw-r--)``\r\n\r\nDerived from the comments in the Glib library I do believe that gio checks for and preserves the link. \r\nThe writing routine ``[geany]\\documents.c::write_data_to_disk()`` for atomic writes calls ``[glib]\\ gfileutils.c::g_file_set_contents()`` this function warns about not preserving symlinks in the description.\r\nThat same routine for gio writes calls ``[glib]\\gfile.c::g_file_replace_contents()`` this function (and callees) do not warn about this. \r\nHence my (weak) conclusion that by default gio will preserve symlinks."}],"action":{"name":"View Issue","url":"https://github.com/geany/geany/issues/1533#issuecomment-313860063"}}}</script>