Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vcpkg] fix bug in Filesystem::absolute #11170

Merged
merged 2 commits into from
May 4, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions toolsrc/src/vcpkg/base/files.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -717,14 +717,14 @@ 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
// absolute was called system_complete in experimental filesystem
return fs::stdfs::system_complete(path, ec);
#else // ^^^ _WIN32 / !_WIN32 vvv
if (path.is_absolute()) {
if (!path.is_absolute()) {
BillyONeal marked this conversation as resolved.
Show resolved Hide resolved
auto current_path = this->current_path(ec);
if (ec) return fs::path();
return std::move(current_path) / path;
Expand Down