[Libreoffice-bugs] [Bug 107967] New: System path on Unix starting with double-slashes converted to single slash
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Sat May 20 07:39:04 UTC 2017
https://bugs.documentfoundation.org/show_bug.cgi?id=107967
Bug ID: 107967
Summary: System path on Unix starting with double-slashes
converted to single slash
Product: LibreOffice
Version: Inherited From OOo
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: LibreOffice
Assignee: libreoffice-bugs at lists.freedesktop.org
Reporter: chris.sherlock79 at gmail.com
It appears that in the OSL code that we do some sanity checking for Unix system
paths and convert double slashes (//) to single slash. However, if a system
path starts with a double-slash then starting with double-slashes we are still
converting this to a single slash.
That's unfortunately not valid. POSIX states the following:
"If a pathname begins with two successive <slash> characters, the first
component following the leading <slash> characters may be interpreted in an
implementation-defined manner, although more than two leading <slash>
characters shall be treated as a single <slash> character."
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_13
In other words, the following path...
//path/to/file.txt
it becomes:
//path/to/file.txt
However, the following path...
///path/to/file.txt
this becomes:
/path/to/file.txt
--
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/20170520/dc86b37d/attachment.html>
More information about the Libreoffice-bugs
mailing list