Inkscape on Windows rewrites the path separator '/' in relative image links (xlink:href attribute) to '\' on save.
Steps to reproduce:
1) prepare files:
copy a bitmap image to current folder
create a sub-folder
save a new Inkscape SVG drawing into the sub-folder
2) open the just saved drawing in Inkscape
3) import the bitmap image saved in the parent folder
(link the bitmap image, not embed)
4) with bitmap image selected, open 'Image Properties' from the context menu
5) change the absolute path into a relative path reference:
../my_image.png
6) save the drawing
Expected result:
The relative link is saved as entered (and as supported on load even by Windows builds, as tested by externally changing the absolute path into a relative link).
Actual result:
On save, the path separator is changed to '\'. This can be monitored live in the image properties dialog if the image is still selected while saving the modified file (Ctrl+S).
Note:
Issue was first reported by deevad on #inkscape-devel - this can pose issues when collaborating with users across different platforms (e.g. translators for the pepper&carrot comics), because of the unexpected changes to the xlink:href attribute values with Windows builds.
Reproduced with Inkscape 0.92.0 r15299, 0.92.1pre0 r15340 on Windows 10.
Inkscape on Windows rewrites the path separator '/' in relative image links (xlink:href attribute) to '\' on save.
Steps to reproduce:
1) prepare files:
copy a bitmap image to current folder
create a sub-folder
save a new Inkscape SVG drawing into the sub-folder
2) open the just saved drawing in Inkscape
3) import the bitmap image saved in the parent folder
(link the bitmap image, not embed)
4) with bitmap image selected, open 'Image Properties' from the context menu
5) change the absolute path into a relative path reference:
../my_image.png
6) save the drawing
Expected result:
The relative link is saved as entered (and as supported on load even by Windows builds, as tested by externally changing the absolute path into a relative link).
Actual result:
On save, the path separator is changed to '\'. This can be monitored live in the image properties dialog if the image is still selected while saving the modified file (Ctrl+S).
Note:
Issue was first reported by deevad on #inkscape-devel - this can pose issues when collaborating with users across different platforms (e.g. translators for the pepper&carrot comics), because of the unexpected changes to the xlink:href attribute values with Windows builds.
Reproduced with Inkscape 0.92.0 r15299, 0.92.1pre0 r15340 on Windows 10.