[Libreoffice-bugs] [Bug 107968] New: Multiple slash handling in Unix directory code wrong

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sat May 20 07:51:56 UTC 2017


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

            Bug ID: 107968
           Summary: Multiple slash handling in Unix directory code wrong
           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 converts double slashes (//) to a single slash. This is actually
correct behaviour (except for beginning with double slashes - see bug 107967),
but we haven't quite got this behaviour correct. 

POSIX actually doesn't mandate double-slashes be replaced by a single slash, it
actually states that multiple slashes should be replaced with a single slash
when parsing a system directory. We currently only check if there is a
double-slash, which means that /path//to/file.txt becomes /path/to/file.txt but
/path////to/file.txt becomes /path//to/file.txt

This shouldn't cause too many issues, however it causes us to also make
////path/to/file.txt to change to //path/to/file.txt instead of
/path/to/file.txt - and that *is* wrong and problematic behaviour because POSIX
treats a leading double-slash specially.

-- 
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/12d91ab5/attachment.html>


More information about the Libreoffice-bugs mailing list