On Sun, 8 Feb 2004, bulia byak wrote:
891852 saves to old location after save-as [ted] Bulia, you mentioned you were going to look at 891852 - did you get a chance to trace down what needs to be done?
Fixed. The source of the problem was that sp_file_save_document() always used the value of sodipodi:docname - which is supposed to be just name, without directory. Therefore it ALWAYS saved into the current directory. This was wrong not only after save-as but also when you load a file from a directory other than current, e.g.
inkscape ../file.svg
Now this function uses document->uri which I build in sp_document_create() from the pathname on the command line and the current dir, using inkscape_rel2abs (which even does some normalization of things like .. in the middle). It may probably still fail for some exotic cases, but the basic operations that I tested now work OK.
Coolness, this'll be quite an improvement.
It sounds like at some point we could benefit from someone gutting and rewriting the sp-file.* stuff; we've had many reports of quirks and bugs in that code, and the code itself isn't as high of quality as we need. I've added a task for the next release to review and appraise it, and figure out when/how to rewrite it.
Bryce