>>>>> "Ingo" == Ingo Kloecker <[EMAIL PROTECTED]> writes:
Ingo> Hi, one of my friends encountered the following problem: After
Ingo> working with LyX on some document he saved it and quit LyX. Then
Ingo> he noticed that the filesize of the lyx-file was 0 Bytes
Ingo> (excellent compression :-)). Unfortunately LyX didn't warn him,
Ingo> that his document couldn't be saved because there was no space
Ingo> left on /home. So he lost the work of a whole morning. I haven't
Ingo> checked if there really isn't a warning (I guess the other users
Ingo> of /home would get a little upset if I used all space which is
Ingo> left on /home only to confirm this behavior), but I think the
Ingo> developers should know it.
Hmmm, this is strange, since LyX checks when closing the file whether
the write was successful (if I understand correctly). The relevant
code is
// Write marker that shows file is complete
fprintf(file, "\n\\the_end\n");
if (file.close()) {
if (flag)
lyxerr.print(_("Error! Could not close file properly: ")
+ filename);
else
WriteFSAlert(_("Error! Could not close file properly: "),
filename);
return false;
}
I would think that this returns false as long as a write failed at
some point. Am I wrong? Another possiblity uis that the warning showed
up on console and not as a popup.
It appears that BufferList::write() calls Buffer::writeFile with flag
set to false. Is there a reason for that? I'd think that one would
like to have a popup message in this case.
JMarc