summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2021-05-31 12:57:18 +0300
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2021-05-31 12:57:18 +0300
commit1d7a63fb8fbdc2fb53744ee1be13b76278fda03d (patch)
tree5050f1c40a0f5cd552353fb42275780917d15cf9 /drivers
parent1d35a35d4f6ddf2e0d4af517b1dd3ee0d273c56e (diff)
Fix `Directory::get_space_left()` result on macOS and Linux.
Diffstat (limited to 'drivers')
-rw-r--r--drivers/unix/dir_access_unix.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/unix/dir_access_unix.cpp b/drivers/unix/dir_access_unix.cpp
index 5abe5d2c87..a2c9bae852 100644
--- a/drivers/unix/dir_access_unix.cpp
+++ b/drivers/unix/dir_access_unix.cpp
@@ -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;