relative link become absolute when object is copied

Bug #498645 reported by Arch Dude on 2009-12-19
This bug affects 2 people
Affects Status Importance Assigned to Milestone

Bug Description

When an object with a a relative xlink is copied and pasted, the new object has an absolute xlink. Behavior is observed in
0.47 and 0.48. Behavior in earlier releases was not tested.

Steps to reproduce:
  1) create an object
  2) create a link
  3) open the link properties, set the uri to "relative.svg", close the link properties
  4) use xml editor to observe the xlink attribute of the object
  5) copy the object and paste a new object
  6) use the xml editor to observe the xlink attribute of the new object.

The SVG standard specifically allows relative links, and relative links are of great practical importance, especially for large collections of related documents.

NOTE: bug #272520 may be related to this bug.

su_v (suv-lp) on 2009-12-20
tags: added: clipboard link
su_v (suv-lp) wrote :

this could be related to the changes for bug #168484 “Relative links use "\" in win32 platform”
which possibly lead to the regression in bug #170225 in Inkscape: “relative image paths instead of absolute”

su_v (suv-lp) wrote :

reproduced with Inkscape 0.47 on OS X 10.5.8:
relative object links and relative links to bitmap images are changed to absolute file names in the pasted copy (within the same document or into a new document).

not reproduced with Inkscape 0.46:
both relative object links and relative links to bitmap images are preserved when copy&pasting an object/image within the same document or into a new document opened in the same instance of Inkscape.

Changed in inkscape:
status: New → Confirmed
su_v (suv-lp) wrote :

correction re Inkscape 0.46:
relative links to bitmap images are kept when pasting within the same document.
when pasting into a new document the relative file name is kept but Inkscape outputs this console message:
WARNING **: xlink:href did not resolve to a valid image file, now trying sodipodi:absref="/Path/to/file_name"

tags: added: regression
Changed in inkscape:
importance: Undecided → Medium
jazzynico (jazzynico) wrote :

Not only the relative image is converted to absolute, but it doesn't get the right path when linked to a subpath (e.g. "images/test.png" -> "/home/nicolas/images/test" instead of "/home/nicolas/Desktop/images/test"). ( wrote :

This is a security issue, because, when the link works (which happens), then the drawer is unaware of it and can distribute the 2 files together. Not only it won't work, but the drawer with disclose his file hierarchy, usually including his username on the system.

jazzynico (jazzynico) wrote :

The image link is still absolute when you paste the image, but now that Bug #170225 (relative image paths instead of absolute) is fixed in the trunk (revision 10124), the image link switches to relative when saving the document.

Changed in inkscape:
status: Confirmed → Triaged
Jonathan Hofinger (jhofinger) wrote :

Hi - thanks for reporting this bug, I've manually migrated it to Inkscape's new bug tracker on GitLab, and closed it here.

Please feel free to file new bugs about the issues you're seeing at

Moved to:
Closed by:

Changed in inkscape:
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.