mirror of
https://github.com/reactos/CMake.git
synced 2024-11-25 04:29:52 +00:00
find_program: Restore leading double slash on Windows network path
Since commit c76c1ea208
(find_program: Consider CWD only for paths with
separator, 2018-05-31, v3.13.0-rc1~413^2) we accidentally convert the
leading `//` to just `/` on results with Windows network paths.
This was caused by `CollapseCombinedPath` being less robust than
`CollapseFullPath`. Restore use of the latter but in a way that
preserves the requirement of the above commit to support candidates that
are themselves absolute.
Fixes: #19049
Issue: #19050
This commit is contained in:
parent
bf02d62532
commit
00c4ddf75e
@ -77,7 +77,7 @@ struct cmFindProgramHelper
|
|||||||
this->TestNameExt = name;
|
this->TestNameExt = name;
|
||||||
this->TestNameExt += ext;
|
this->TestNameExt += ext;
|
||||||
this->TestPath =
|
this->TestPath =
|
||||||
cmSystemTools::CollapseCombinedPath(path, this->TestNameExt);
|
cmSystemTools::CollapseFullPath(this->TestNameExt, path);
|
||||||
|
|
||||||
if (cmSystemTools::FileExists(this->TestPath, true)) {
|
if (cmSystemTools::FileExists(this->TestPath, true)) {
|
||||||
this->BestPath = this->TestPath;
|
this->BestPath = this->TestPath;
|
||||||
|
Loading…
Reference in New Issue
Block a user