View Issue Details

IDProjectCategoryView StatusLast Update
0016761ScribusGraphics / Image Framespublic2022-02-26 10:12
Reporterscribum Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Product Version1.5.8 
Summary0016761: Images path in PFILE refers to parent directoy name if it is a symbolic link
DescriptionIf we work on a SLA file contained in a symbolic link to a "project folder", PFILE vars will contain the name of the symbolic link (parent directory). So actually they will not be relative to the SLA file position.
If the name of the parent directory (aka our symbolic link) will change or it will be pointed to an other folder, the images in the SLA file will disappear.
Steps To Reproduce
On linux system, assume we have a project folder containing our empty document.sla file and an image.jpg.

project-folder
├── image.jpg
└── document.sla

We want to add the image within the document, so we will create a new image frame and then load ./image.jpg. And save.
If we open SLA file with an editor or "less" command we will see the PFILE variable set to "./image.jpg". So the path to image file should be relative to where the SLA file is placed (in this example the same directory).
That is the expected behavior, and it is useful in case we have to rename project-folder for whatever reason.

Now lets consider following case: we have same project-folder as well as a symbolic link to it:

├── project-folder
│ ├── image.jpg
│ └── document.sla
└── project-link -> project-folder

Now, we want to work from within the symbolic link. So with our file manager, or from Scribus (File>open) menu let's open our SLA file by choosing:

project-link/document.sla

As in above example: add an image frame and load image.jpg that scribus will find in the same folder. And save.

If we check SLA file we will see our PFILE var set to:

"../project-link/image.jpg"

This is not the expected path of the image (it should be "./image.jpg").
I would consider this as a bug, because working with symlinks could be useful for many reasons and scribus should preserve relative path to SLA file without referring to parent directories even if actually those are a symbolic link.

If we remove that "project-link" or point it to an other project folder, the image in our old SLA file just will disappear. Not good.
Tags1.5.8, image, linux
PatchNo

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2022-02-26 10:08 scribum New Issue
2022-02-26 10:08 scribum Tag Attached: 1.5.8
2022-02-26 10:08 scribum Tag Attached: image
2022-02-26 10:08 scribum Tag Attached: linux