mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-06-07 11:22:48 +08:00
fix two bugs in status
This commit is contained in:
parent
420dbffaa0
commit
58f95cc856
@ -82,7 +82,7 @@ namespace vcpkg::Files
|
|||||||
return fs::file_status(ft, permissions);
|
return fs::file_status(ft, permissions);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
auto result = symlink ? fs::stdfs::symlink_status(p, ec) : fs::stdfs::status(p, ec);
|
auto result = follow_symlinks ? fs::stdfs::status(p, ec) : fs::stdfs::symlink_status(p, ec);
|
||||||
// libstdc++ doesn't correctly not-set ec on nonexistent paths
|
// libstdc++ doesn't correctly not-set ec on nonexistent paths
|
||||||
if (ec.value() == ENOENT || ec.value() == ENOTDIR)
|
if (ec.value() == ENOENT || ec.value() == ENOTDIR)
|
||||||
{
|
{
|
||||||
@ -95,7 +95,7 @@ namespace vcpkg::Files
|
|||||||
|
|
||||||
fs::file_status status(const fs::path& p, std::error_code& ec) noexcept
|
fs::file_status status(const fs::path& p, std::error_code& ec) noexcept
|
||||||
{
|
{
|
||||||
return status_implementation(false, p, ec);
|
return status_implementation(true, p, ec);
|
||||||
}
|
}
|
||||||
fs::file_status symlink_status(const fs::path& p, std::error_code& ec) noexcept
|
fs::file_status symlink_status(const fs::path& p, std::error_code& ec) noexcept
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user