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

FD Cami francois.cami at xxxxx
Sat Apr 26 11:34:49 UTC 2008


On Fri, 25 Apr 2008 15:12:17 +0200
Enrico Tröger <enrico.troeger at uvena.de> wrote:

> 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.
> 
> The only solution which comes to my mind would be to check for
> available disk space before trying to write the file. Unfortunately,
> there seems to be no portable way of doing this.

Hello,

Some editors (joe, gedit) move the old file to another place (in both
cases, they rename the file to file~) before saving. If there is no space
left, you still have the file~ to recover from, I guess.
I do not like their default behaviour though, as having lots of files
with ~ appended to their names is rather clunky.
It may be that one way to do it is :
* move "file" to "file~"
* save memory buffer to "file"
* remove "file~"
Since this does not scale very well for big files, there should be some
on/off option in preferences.

Cheers

F



More information about the Users mailing list