Skip to content

Commit

Permalink
Merge pull request #296 from 1178264094/develop
Browse files Browse the repository at this point in the history
fix the windows function call, the error logic of the return code
  • Loading branch information
Lastique authored Dec 5, 2023
2 parents 53eabae + 2a0e1ea commit eb0d5fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/operations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4301,7 +4301,7 @@ space_info space(path const& p, error_code* ec)
str.push_back(path::preferred_separator);

ULARGE_INTEGER avail, total, free;
if (!error(::GetDiskFreeSpaceExW(str.c_str(), &avail, &total, &free) == 0, p, ec, "boost::filesystem::space"))
if (!error(::GetDiskFreeSpaceExW(str.c_str(), &avail, &total, &free) == 0 ? BOOST_ERRNO : 0, p, ec, "boost::filesystem::space"))
{
info.capacity = static_cast< uintmax_t >(total.QuadPart);
info.free = static_cast< uintmax_t >(free.QuadPart);
Expand Down

0 comments on commit eb0d5fd

Please sign in to comment.