diff --git a/src/fs_find_mount_point.cpp b/src/fs_find_mount_point.cpp index 8110d6d9..1c5ca0bc 100644 --- a/src/fs_find_mount_point.cpp +++ b/src/fs_find_mount_point.cpp @@ -19,7 +19,9 @@ fs::find_mount_point(const ghc::filesystem::path &path_) return nonstd::make_unexpected(ec); rv = fs::lstat(can_path,&initial_st); + ec.assign(errno); if(rv == -1) + return nonstd::make_unexpected(std::error_code(errno,std::generic_category())); tmp_path = can_path;