[Geany] Problems when "no space left on device"

Enrico Tröger enrico.troeger at xxxxx
Tue Apr 29 14:03:57 UTC 2008


On Mon, 28 Apr 2008 12:41:10 +0100, Nick Treleaven
<nick.treleaven at btinternet.com> wrote:

> On Fri, 25 Apr 2008 15:12:17 +0200
> Enrico Tröger <enrico.troeger at uvena.de> wrote:
> 
> > Hi,
> > 
> > yesterday an user reported that Geany behaves badly when there is no
> > free disk space on the disk where the current file should be saved.
> > That is, when you are editing a file in Geany, meanwhile your disk
> > runs out of free space (extensive logging, copying large files, some
> > process gone bad, ...) and you then save the file in Geany, it gets
> > overwritten and the file is emptied.
> > This is indeed bad.
> > And there seems to be no easy way to fix it.
> 
> Does g_file_set_contents() work? It says it has good error checking:
> http://library.gnome.org/devel/glib/stable/glib-File-Utilities.html#g-file-set-contents

It would work because it does basically the same as FD Cami suggested.
The contents are written to a temporary file and if this was successful
it renames the temporary file to the target file. But as also mentioned
in the docs for this function, hard links and set file permissions will
break.


Regards,
Enrico

-- 
Get my GPG key from http://www.uvena.de/pub.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/users/attachments/20080429/74902e91/attachment.pgp>


More information about the Users mailing list