[Geany-devel] Changed file saving implementation for systems with GIO

Dimitar Zhekov dimitar.zhekov at xxxxx
Wed Nov 10 19:23:18 UTC 2010


On Wed, 10 Nov 2010 18:14:04 +0000
Nick Treleaven <nick.treleaven at btinternet.com> wrote:

> On Wed, 10 Nov 2010 20:02:53 +0200
> Dimitar Zhekov <dimitar.zhekov at gmail.com> wrote:
> 
> > Why fake 0 errno as EIO? g_file_set_contents() doesn't, and *strerror()
> > returns something for 0, usually "Error 0".
> 
> GLib says to use g_strerror, which says 'Success', which is confusing.

It is, but "Input/output error" usually means a failed disk. (o_O)
POSIX says "Some physical input or output error has occurred."

> > Mind if I try to improve the error handling, using gfileutils.c as a
> > source? There will be 3 new translation strings.
> 
> Sure, have a go.

Here. errno 0 still displays "Success" at the end of the messages, but
at least they start "Failed to"... Well, it's identical to glib,
including the paranoid resetting of errno before each call.

Tested with writing to /boza, full disk and a fake close error.

-- 
E-gards: Jimmy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: write_data_error_handling-5395.diff
Type: text/x-diff
Size: 1720 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20101110/1a47f382/attachment.diff>


More information about the Devel mailing list