![](https://secure.gravatar.com/avatar/0956d6c6360b9cea89485132670458d4.jpg?s=120&d=mm&r=g)
2009/8/8 Maximilian Albert <maximilian.albert@...1439...>:
After some investigation, I found that it's caused by the fact that Inkscape reads the SVG attribute "inkscape:output_extension" from newly opened files and uses this as the default file extension when invoking the "Save as ..." dialog for the first time. I can fix the above bug by simply discarding it, but then I'm wondering why this attribute is stored/used at all? Would it be save to discard it and simply reuse the last used file extension when the save dialog is opened? Hmm, I guess I'll just commit my changes after some further testing (not before tomorrow, though) and will wait for people to comment after testing the new behaviour.
I haven't heard back from anyone but I've discovered the discusion of the following bug report which says that inkscape:output_extension should be eliminated:
https://bugs.launchpad.net/inkscape/+bug/170966
Since my changes already partly achieved this I went ahead and dumped inkscape:output_extension completely from the code base in rev. 22033, where I also committed the other fixes to the behaviour of "Save as ..."/"Save a copy ..." (so that now the various types of save dialogs should remember their file extensions and paths completely independently of each other). It turned out that a good deal of code could be simplified in the process. Although the changes to the code base are not huge, they are non-neglegible, so I'd like everyone to test this thoroughly and report any problems. In particular, please test with all combinations of "Save as ...", "Save as copy ...", "Export bitmap" and various file types, different folders, several documents opened at once, etc. (I did a lot of tests myself but I may have missed some cases). If you are very nitpicky, you can double check that the saved files are actually of the types indicated by their file extensions. Feedback like "works fine for me" is also acknowledged. :-) If people feel uneasy with such a change at this point I'm also fine with holding it off until after 0.47, although I believe it could be a major improvement to this release (and it's been a long-requested fix, too).
One remark concerning the elimination of inkscape:output_extension: We now don't store the file extension on a per-document basis any more but rather on a per-save-action basis. That is, if you have two documents open at the same time and save one of them using "Save as ..." with a certain file type, switch to the other document and invoke "Save as ...", it remembers the just used file type. I hope this is desired, since it's also requested in LP #171932, but I thought I'd mention it.
Moreover, the folder is also stored on a per-save-basis, which might be confusing if you are working with two documents simultaneously each of which you want to successively "save as ..." in different folders (because the dialog always presents you with the folder of the last saved file). Should there be an option somewhere to always choose the current folder and only remember the last used file extension or is this overkill because such a workflow is unlikely?
And another thing: When saving a newly created file for the first time, I made the dialog propose "Inkscape SVG" as the file format, regardles of what previous files were saved as. I think this reasonable, but do others agree?
Thanks for any feedback! Max