Crash opening old inkscape file (convert to legacy Inkscape file) if filename doesn't end in SVG
Steps to reproduce:
- Open https://gitlab.com/inkscape/inbox/uploads/360a70d9f05f6d3b3b5f51784a14276c/TEST.SVG in Inkscape
- The convert legacy inkscape file dialog should pop up (if not, open it again, so it opens in another window)
- Choose the second option (This file is intended for physical output, such as paper or 3D prints)
- Make sure save backup is checked
- Click OK
- Crash
Note:
- Rename file from TEST.SVG to test.svg
- no crash doing this
Backtrace
inkscape-backtrace-simple-file.txt
Partial:
Thread 1 "inkscape" hit Catchpoint 1 (exception thrown), 0x00007ffff4248d1d in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(gdb) bt
...
#5 0x00007ffff4ea64a8 in Glib::ustring::insert(unsigned long, char const*) (this=this@entry=0x7fffffffcb30, i=<optimised out>, src=src@entry=0x7ffff76cf530 "_backup") at ustring.cc:565
#6 0x00007ffff7214a4e in sp_file_save_backup(Glib::ustring) (uri=...) at ../src/file-update.cpp:266
#7 0x00007ffff7216306 in sp_file_convert_dpi(SPDocument*) (doc=doc@entry=0x5555565a9c00) at ../src/file-update.cpp:485
#8 0x00007ffff72fcbfe in InkscapeApplication::document_fix(InkscapeWindow*) (this=this@entry=0x7ffff7dd3548 <ConcreteInkscapeApplication<Gtk::Application>::get_instance()::instance+40>, window=<optimised out>) at ../src/inkscape-application.cpp:332
#9 0x00007ffff72fded4 in InkscapeApplication::window_open(SPDocument*) (this=this@entry=0x7ffff7dd3548 <ConcreteInkscapeApplication<Gtk::Application>::get_instance()::instance+40>, document=<optimised out>, document@entry=0x5555565a9c00) at ../src/inkscape-application.cpp:387