diff options
Diffstat (limited to 'platform/osx/dir_access_osx.mm')
-rw-r--r-- | platform/osx/dir_access_osx.mm | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/platform/osx/dir_access_osx.mm b/platform/osx/dir_access_osx.mm index 29f8fda663..d123c5c648 100644 --- a/platform/osx/dir_access_osx.mm +++ b/platform/osx/dir_access_osx.mm @@ -47,9 +47,9 @@ DirAccess *DirAccessOSX::create_fs() { } bool DirAccessOSX::list_dir_begin() { - + list_dir_end(); //close any previous dir opening! - + // char real_current_dir_name[2048]; //is this enough?! //getcwd(real_current_dir_name,2048); @@ -63,7 +63,7 @@ bool DirAccessOSX::list_dir_begin() { } bool DirAccessOSX::file_exists(String p_file) { - + GLOBAL_LOCK_FUNCTION @@ -207,7 +207,7 @@ Error DirAccessOSX::make_dir(String p_dir) { GLOBAL_LOCK_FUNCTION p_dir=fix_path(p_dir); - + char real_current_dir_name[2048]; getcwd(real_current_dir_name,2048); chdir(current_dir.utf8().get_data()); //ascii since this may be unicode or wathever the host os wants @@ -319,14 +319,14 @@ 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; -#endif +#endif }; |