[Libreoffice-bugs] [Bug 131693] Unable to open document if path has "\\?\" UNC prefix in Windows 10
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Mon Nov 30 11:14:48 UTC 2020
https://bugs.documentfoundation.org/show_bug.cgi?id=131693
Mike Kaganski <mikekaganski at hotmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sbergman at redhat.com
--- Comment #2 from Mike Kaganski <mikekaganski at hotmail.com> ---
(In reply to Buovjaga from comment #1)
No. The problem here is specifically with "\\?\" prefix, not handled in
INetURLObject::convertRelToAbs and INetURLObject::setAbsURIRef, both used from
GetURL_Impl in desktop/source/app/app.cxx.
This results in the URL like "file:////?/C:/...", which then is converted back
to system path in osl_getSystemPathFromFileURL_ (sal/osl/w32/file_url.cxx),
which strips "file:///", and the rest "/?/C:/..." is not a valid path.
This can be easily fixed by a modification of osl_getSystemPathFromFileURL_ to
test for starting with "file:////?/" and then skipping only 7 characters, but
it seems that the proper fix is in INetURLObject, which should in theory behave
just like osl_getFileURLFromSystemPath for such paths, simply dropping "\\?\"
from the result URL.
However, I hesitate to touch this code myself (too fragile); Stephan, could you
take a look at it please?
--
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/20201130/c387f44e/attachment-0001.htm>
More information about the Libreoffice-bugs
mailing list