diff options
author | J08nY <johny@neuromancer.sk> | 2016-06-06 07:30:23 +0200 |
---|---|---|
committer | J08nY <johny@neuromancer.sk> | 2016-06-06 08:14:22 +0200 |
commit | 3fb3b7c1f7609f73b6992b43316e2a52764f09db (patch) | |
tree | 87c674e64e0753bab964d62f4c4788b50640b17d /platform/osx | |
parent | 63ab89d28cba3256eb9cdb707832e0551621acdb (diff) |
Somewhat fixed Directory::get_space_left() return values.
Diffstat (limited to 'platform/osx')
-rw-r--r-- | platform/osx/dir_access_osx.mm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/platform/osx/dir_access_osx.mm b/platform/osx/dir_access_osx.mm index 20dc1df8f4..d123c5c648 100644 --- a/platform/osx/dir_access_osx.mm +++ b/platform/osx/dir_access_osx.mm @@ -319,10 +319,10 @@ size_t DirAccessOSX::get_space_left() { struct statvfs vfs; if (statvfs(current_dir.utf8().get_data(), &vfs) != 0) { - return -1; + return 0; }; - return vfs.f_bfree * vfs.f_bsize; + return (size_t) (vfs.f_bavail * vfs.f_bsize); #else #warning THIS IS BROKEN return 0; |