<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - Multiple slash handling in Unix directory code wrong"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=107968">107968</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Multiple slash handling in Unix directory code wrong
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>LibreOffice
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>Inherited From OOo
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>UNCONFIRMED
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>LibreOffice
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>libreoffice-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>chris.sherlock79@gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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 <a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - System path on Unix starting with double-slashes converted to single slash"
   href="show_bug.cgi?id=107967">bug 107967</a>),
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.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>