aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-05-08 19:45:39 -0700
committerRobert Schumacher <roschuma@microsoft.com>2017-05-08 19:45:39 -0700
commit7bb0224ee152d8ffba7ddf3d07a53d4d39faa1a2 (patch)
tree2113261ebcc03983111bb07a677257e3fd2eeba8
parentfb060524823f23970bfc1c10f42482496f52a61a (diff)
downloadvcpkg-7bb0224ee152d8ffba7ddf3d07a53d4d39faa1a2.tar.gz
vcpkg-7bb0224ee152d8ffba7ddf3d07a53d4d39faa1a2.zip
[vcpkg] Use stdfs::equivalent() to correctly compare file paths.
Fixes #1053.
-rw-r--r--toolsrc/src/VcpkgPaths.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp
index eabdcd410..3dd32de01 100644
--- a/toolsrc/src/VcpkgPaths.cpp
+++ b/toolsrc/src/VcpkgPaths.cpp
@@ -86,11 +86,13 @@ namespace vcpkg
}
const fs::path actual_downloaded_path = Strings::trimmed(rc.output);
+ std::error_code ec;
+ auto eq = fs::stdfs::equivalent(expected_downloaded_path, actual_downloaded_path, ec);
Checks::check_exit(VCPKG_LINE_INFO,
- expected_downloaded_path == actual_downloaded_path,
+ eq && !ec,
"Expected dependency downloaded path to be %s, but was %s",
- expected_downloaded_path.generic_string(),
- actual_downloaded_path.generic_string());
+ expected_downloaded_path.u8string(),
+ actual_downloaded_path.u8string());
return actual_downloaded_path;
}