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

--- Comment #4 from Mike Kaganski <[email protected]> ---
(In reply to Thomas K from comment #0)
> Is there a way to normalize the links without sending requests to the
> associated resources? All it seems to do in my case is to turn backslashes
> into slashes.

This is not a correct idea: normalizing is not only "turning backslashes into
slashes", it is also e.g. converting short 8.3 names into full names, and
getting proper case of the path parts (important in case-insensitive systems,
where multiple ways to represent the same path may make it impossible to
compare paths, including checks for common root, important for producing
relative URLs).

(In reply to Thomas K from comment #2)
> The call to FindFirstFileW is still there at
> https://git.libreoffice.org/core/+/refs/heads/libreoffice-7-1-6/sal/osl/w32/
> file_dirvol.cxx#1084. So one would expect the issue to also still be there
> if the theory that it is caused by this call is valid.

Of course, it is correct that this is *only a theory*, and it needs to be
tested regardless if the call is there or not: the said call is in
osl_getDirectoryItem, some low-level LO API, and the higher-level APIs could
(*in theory* :-D) start to use other low-level APIs - see e.g. tdf#98705, where
we made some changes to the WinAPI calls we perform when get case-correct file
paths - even though unrelated to this case, it shows that changes on different
levels can affect the result.

Possibly this should be NOTABUG, since calculation of relative links is correct
and inevitable for case when you *save* (i.e., define new path) a document with
relative links, and there's no way to normalize paths without getting that data
from OS/filesystem, at which point, file access happens.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to