[Github-comments] [geany/geany] Preventing destroying of symbolic/hard links in Windows OS. (#1270)

Beldyuga Ivan notifications at xxxxx
Sat Oct 22 01:18:42 UTC 2016


biv91 commented on this pull request.



> @@ -1955,37 +1961,51 @@ static gchar *write_data_to_disk(const gchar *locale_filename,
 		/* Use POSIX API for unsafe saving (GVFS-unsafe) */
 		/* The error handling is taken from glib-2.26.0 gfileutils.c */
 		errno = 0;
-		fp = g_fopen(locale_filename, "wb");
+		fp = g_fopen(locale_filename, "w+b"); // we can not destroy  symbolic/hard links

if use "w" in case of appcrash will lost  entire  file.
if use "a" we can not seek to start of file and rewrite it.
if "w+" we can have significant part of file if appcrash, because  truncate+write.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1270
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20161021/961efd33/attachment.html>


More information about the Github-comments mailing list