[Geany-devel] [geany/geany] 7cc443: Don't append file truncation warning if file doesn't exist - incorrect for remote files

Lex Trotman elextr at xxxxx
Fri Jan 27 21:36:56 UTC 2012


On Sat, Jan 28, 2012 at 12:38 AM, Nick Treleaven
<nick.treleaven at btinternet.com> wrote:
> On 26/01/2012 22:32, Lex Trotman wrote:
>>
>> If writing a remote file failed half way because of a network failure,
>> then if the network is still faulty when we g_file_test for a regular
>> file, it will fail because the file doesn't exist, but the partly
>> written file may (is likely to) be truncated.
>
>
> Well, they'll still get a save failed warning with the specific OS error
> message. Just to check, GFile writes directly to a network file?

If the file doesn't exist the it could be said that it was the
ultimate in truncation :)

>
> Anyway, I don't know how to improve the situation. My commit is necessary to
> avoid confusing users about truncation on a local file that doesn't even

No, neither do I, but we do get complaints about truncated files on
network shares/gvfs every so often, thats why we added the message.

So this change actually prevents the message in its main use-case,
where harm may have been done, in favour of a use-case where no harm
has been done, and that is bad.

Cheers
Lex


> exist.
>
> Nick
> _______________________________________________
> Geany-devel mailing list
> Geany-devel at uvena.de
> https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel



More information about the Devel mailing list