~suv wrote:
... With regard to bug #283769 - on OS X I only saw this issue randomly (AFAIU bug #283769 reports that on Windows Inkscape completely fails to create an emergency-save document for saved files?) and to me it appeared to depend on both the kind of crash and the original file name [1]. (I have reproduced a lot of crashes reported in the bug tracker ;)
There was a bug in the emergency saving code that would cause pretty much any file name to get some invalid characters appended (the terminating null character was in the wrong place).
Notes after preliminary tests with revision 9470/9471 [2]:
- changed location of emergency-saved documents
Previously emergency-saved files have all been saved to $HOME, now only emergency-saved files of not yet saved Inkscape documents are stored in $HOME, those of saved files are stored in the same directory of the original file. I'm not sure if this is really better - at least up to now it was easy to manage those emergency-save files (decide to keep for reuse or delete) because they all appeared in the same location. Now they will be in various places and more likely to stay behind if I don't regularly use the file browser to 'cleanup'. Until Inkscape has a built-in crash recovery feature IMHO a central location for emergency save is preferable. But maybe that's just me ;)
Hmm... I feared as much. Basically on Windows the problem is that the "home" directory is a VERY inconvenient place to put things (no one ever looks there, although I think it's easier to access in newer versions of Windows). So at least for me it makes much more sense to put the emergency save file right where the file was that I was working on. After the crash I'll probably want to continue working on it anyway so I'll bump into it (instead of having to go to my home dir explicitly).
But it's not a huge issue for me. I can live with a few emergency save files piling up in my home dir, it's not as if I ever look there anyway :) If desired the order can be very easily switched around.
- file name of emergency-saved document
While previously often the last character of the original file name was either cut off or replaced with an apparently random character (I don't know what is the correct term: binary or control? It is not a regular Unicode character) [1], now the new file name even includes the file extension in the name (e.g. file "test-1.svg" is emergency-saved as "test-1.svg.2010_06_02_20_50_43.0.svg"). Could the original file extension be excluded when creating the new file name? Or is there a reason to include it?
I actually didn't change this part, just fixed it. As far as I can tell this was exactly what the old code tried to do. I also thought it was a bit weird to include the extension, but it might make sense in some cases. Again, it's not a big issue and I can relatively easily change it around so it also chops off the extension.