Windows: '/' in relative image links rewritten as '\' on save
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Fix Released
|
Medium
|
jazzynico | ||
0.92.x |
Fix Released
|
Medium
|
jazzynico |
Bug Description
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 '\' (the 'xlink:href' attribute value is changed from '../my_image.png' to '..\my_image.png'). 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 (64bit, MSI), 0.92.1pre0 r15340 (64bit, 7z) on Windows 10.
description: | updated |
Changed in inkscape: | |
status: | Fix Committed → Fix Released |
confirmed on Windows 10, Inkscape 0.92.0 r15299
if I load a jpg file using a link, then the XML editor initially reports the link as: /C:/Windows/ Temp/cathedral. jpg
xlink:href = file://
after saving the file, the link is shown as: absref= "C:\Windows\ Temp\cathedral. jpg" "cathedral. jpg"
sodipodi:
xlink:href=