On 09/10/2010 09:35 AM, Nick Treleaven wrote:
On Tue, 6 Apr 2010 12:10:13 +0100 Nick Treleavennick.treleaven@btinternet.com wrote:
On Sat, 03 Apr 2010 03:51:18 +0400 Алексей Антипов1a_antipov@mail.ru wrote:
Please find the patch in attachment. When building with GIO, it would use g_file_replace_contents
I think this is a good idea (but haven't tested it as I don't have GIO). However, I don't think we should change the meaning of the 'safe file saving' pref. What if there's a bug in GIO? At least we know that pref doesn't lose data.
I've still been using a GLib 2.14 system (so haven't personally tested this), but I think we ought to try using GIO for document saving as it may fix the network file truncation problems.
I attach an edited version of Алексей's patch, which doesn't make backups. Please test - if GIO saving is used then you should see a debug message "Using GIO to save: /path/foo.c" on saving. File permissions hopefully will be maintained.
I patched and compiled and opened and saved a few files on the remote FTP severs that had been giving me trouble with fwrite, and it seemed to work fine, very slow but it worked, but no debug message...should I be changing something in the config possibly? Or maybe I didn't patch it correctly and this is a false positive?
Regards,
Brad