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.
It appears that the code comments are the issue here, they talk about double-slashes but actually, the code correctly checks for multiple slashes and changes to a single slash.
I will add a unit test to check for this, and I've updated the comments.
Chris Sherlock committed a patch related to this issue.
It has been pushed to "master":
tdf#107968 - double slash handling misleading; add unit test
It will be available in 5.4.0.
The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
Affected users are encouraged to test the fix and report feedback.
Since there's a commit for this bug, moving it to NEW...
The commit fixed the issue.