diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2017-04-11 15:16:39 -0700 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2017-04-11 15:16:39 -0700 |
| commit | 0bc21296c9ef32412237a8cc0c8141d0226b9070 (patch) | |
| tree | be76ea0d3e3b2d8f469f8ff83fe2187d533efabd /toolsrc/src/VcpkgPaths.cpp | |
| parent | b34c40a4e674f5db538e84ca2b9509482ac140e7 (diff) | |
| download | vcpkg-0bc21296c9ef32412237a8cc0c8141d0226b9070.tar.gz vcpkg-0bc21296c9ef32412237a8cc0c8141d0226b9070.zip | |
[vcpkg] Alias out standard filesystem headers to ensure clean separation.
Diffstat (limited to 'toolsrc/src/VcpkgPaths.cpp')
| -rw-r--r-- | toolsrc/src/VcpkgPaths.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index 84343a727..49f50f270 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -156,7 +156,7 @@ namespace vcpkg Expected<VcpkgPaths> VcpkgPaths::create(const fs::path& vcpkg_root_dir) { std::error_code ec; - const fs::path canonical_vcpkg_root_dir = fs::canonical(vcpkg_root_dir, ec); + const fs::path canonical_vcpkg_root_dir = fs::stdfs::canonical(vcpkg_root_dir, ec); if (ec) { return ec; @@ -214,10 +214,9 @@ namespace vcpkg bool VcpkgPaths::is_valid_triplet(const Triplet& t) const { - auto it = fs::directory_iterator(this->triplets); - for (; it != fs::directory_iterator(); ++it) + for (auto&& path : get_filesystem().non_recursive_find_all_files_in_dir(this->triplets)) { - std::string triplet_file_name = it->path().stem().generic_u8string(); + std::string triplet_file_name = path.stem().generic_u8string(); if (t.canonical_name() == triplet_file_name) // TODO: fuzzy compare { //t.value = triplet_file_name; // NOTE: uncomment when implementing fuzzy compare @@ -279,7 +278,7 @@ namespace vcpkg // Skip any instances that do not have vcvarsall. const fs::path vcvarsall_bat = vc_dir / "Auxiliary" / "Build" / "vcvarsall.bat"; paths_examined.push_back(vcvarsall_bat); - if (!fs::exists(vcvarsall_bat)) + if (!fs.exists(vcvarsall_bat)) continue; // Locate the "best" MSVC toolchain version |
