Merge pull request #49222 from bruvzg/fix_unix_free_space

Fix `Directory::get_space_left()` result on macOS and Linux.
This commit is contained in:
Rémi Verschelde 2021-05-31 12:42:04 +02:00 committed by GitHub
commit afe776c19e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -460,7 +460,7 @@ uint64_t DirAccessUnix::get_space_left() {
return 0;
};
return vfs.f_bfree * vfs.f_bsize;
return (uint64_t)vfs.f_bavail * (uint64_t)vfs.f_frsize;
#else
// FIXME: Implement this.
return 0;