On Mon, 28 Apr 2008 12:41:10 +0100, Nick Treleaven <[EMAIL PROTECTED]> wrote:
> On Fri, 25 Apr 2008 15:12:17 +0200 > Enrico Tröger <[EMAIL PROTECTED]> 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
pgp7F1ycnFKNz.pgp
Description: PGP signature
_______________________________________________ Geany mailing list [email protected] http://lists.uvena.de/cgi-bin/mailman/listinfo/geany
