[Libreoffice-bugs] [Bug 131165] New: Relative paths are just shrouded absolute paths

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Thu Mar 5 17:34:12 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=131165

            Bug ID: 131165
           Summary: Relative paths are just shrouded absolute paths
           Product: LibreOffice
           Version: 6.4.1.1 rc
          Hardware: All
                OS: Linux (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Writer
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: rainer.klute at gmx.de

Description:
I am saving URLs as relative paths (“Save URLs relative to file system”) in
Writer, because I believe it is a good idea to be able to move documents and
its referenced resources like images and templates around at will, as long as
their relative positions are kept intact.

However, LibreOffice creates relatives paths in a way that effectively inhibits
just that. Indeed, these relative paths are really just shrouded absolute
paths.

For example, I have a text document in the

/home/user/dir1/dir2/dir3/dir4

directory. The document has a link to an embedded image, which is located in
the

images/dir1/dir2/image.png

file. However, instead of using just that relative path (resp.
"../images/dir1/dir2/image.png", as seen from inside the document), LibreOffice
creates this path:

../../../../../../../../home/user/dir1/dir2/dir3/dir4/images/dir1/dir2/image.png

This is effectively just an absolute path with a prepended (“alibi”) series of
".." elements, navigating to the filesystem root. This nails my document to the
very directory it currently it is in. It is not possible to move the document
together with its "images" subdirectory elsewhere, let alone check it into a
revision control system and have others check it out to very different
locations on very different platforms.

Steps to Reproduce:
1. Create a text document and insert an image as link.
2. Save the document.
3. Unzip the document and inspect the content.xml file.
4. Notice that the link is broken as described.

Actual Results:
See description above, e.g., a “relative” path like

../../../../../../../../home/user/dir1/dir2/dir3/dir4/images/dir1/dir2/image.png

instead of 

../images/dir1/dir2/image.png

is stored in the document.

Expected Results:
See above.


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.4.1.1
Build ID: 40(Build:1)
CPU threads: 8; OS: Linux 5.5; UI render: default; VCL: kf5; 
Locale: en-US (C); UI-Language: en-US
Calc: threaded

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200305/3ed0493e/attachment.htm>


More information about the Libreoffice-bugs mailing list