diff options
| author | nicole mazzuca <mazzucan@outlook.com> | 2020-05-04 15:25:38 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-04 15:25:38 -0700 |
| commit | 46bf8c52cb343b6557a48b5b80aad56cdeedd4d8 (patch) | |
| tree | 7f3e1bba357dabcc466616e565d06d1b76c9efeb | |
| parent | 63e1d87432455b17bd74b92b5ee5126809fb8dc9 (diff) | |
| download | vcpkg-46bf8c52cb343b6557a48b5b80aad56cdeedd4d8.tar.gz vcpkg-46bf8c52cb343b6557a48b5b80aad56cdeedd4d8.zip | |
[vcpkg] fix bug in Filesystem::absolute (#11170)
* [vcpkg] fix bug in Filesystem::absolute
* flip the conditional for billy
| -rw-r--r-- | toolsrc/src/vcpkg/base/files.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/toolsrc/src/vcpkg/base/files.cpp b/toolsrc/src/vcpkg/base/files.cpp index a364e8178..8e554e4bc 100644 --- a/toolsrc/src/vcpkg/base/files.cpp +++ b/toolsrc/src/vcpkg/base/files.cpp @@ -717,7 +717,7 @@ namespace vcpkg::Files virtual fs::path absolute(const fs::path& path, std::error_code& ec) const override { -#if VCPKG_USE_STD_FILESYSTEM +#if VCPKG_USE_STD_FILESYSTEM return fs::stdfs::absolute(path, ec); #else // ^^^ VCPKG_USE_STD_FILESYSTEM / !VCPKG_USE_STD_FILESYSTEM vvv #if _WIN32 @@ -725,11 +725,11 @@ namespace vcpkg::Files return fs::stdfs::system_complete(path, ec); #else // ^^^ _WIN32 / !_WIN32 vvv if (path.is_absolute()) { + return path; + } else { auto current_path = this->current_path(ec); if (ec) return fs::path(); return std::move(current_path) / path; - } else { - return path; } #endif #endif |
