diff options
author | Ton Roosendaal <ton@blender.org> | 2005-04-30 13:57:35 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2005-04-30 13:57:35 +0400 |
commit | ea3f5794828a2fa4cc3ceaed8ec76419911bbebe (patch) | |
tree | ac9a51289c198f271e538f88578c2647ca7d349d /source/blender/blenlib/intern/storage.c | |
parent | feca8c4644143ece08d0fdd90af480a7f4a9ddc8 (diff) |
- file sizes > 4 GB were not correctly displayed in the file window. It
still was using int for calculus... made it using 64 bits ints.
- The "disk free" indicator in the header didn't work for OSX, due to
a missing #ifdef __APPLE_
Diffstat (limited to 'source/blender/blenlib/intern/storage.c')
-rw-r--r-- | source/blender/blenlib/intern/storage.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c index 2d72922ccf7..def44bb69f2 100644 --- a/source/blender/blenlib/intern/storage.c +++ b/source/blender/blenlib/intern/storage.c @@ -188,7 +188,7 @@ double BLI_diskfree(char *dir) if (slash) slash[1] = 0; } else strcpy(name,"/"); -#if defined (__FreeBSD__) || defined (linux) || defined (__OpenBSD__) +#if defined (__FreeBSD__) || defined (linux) || defined (__OpenBSD__) || defined (__APPLE__) if (statfs(name, &disk)) return(-1); #endif #ifdef __BeOS @@ -316,8 +316,13 @@ void BLI_adddirstrings() char size[250]; static char * types[8] = {"---", "--x", "-w-", "-wx", "r--", "r-x", "rw-", "rwx"}; int num, mode; - int num1, num2, num3, num4, st_size; - + int num1, num2, num3, num4; +#ifdef WIN32 + __int64 st_size; +#else + long long st_size; +#endif + struct direntry * file; struct tm *tm; time_t zero= 0; @@ -372,7 +377,7 @@ void BLI_adddirstrings() strftime(files[num].time, 8, "%H:%M", tm); strftime(files[num].date, 16, "%d-%b-%y", tm); - st_size= (int)files[num].s.st_size; + st_size= files[num].s.st_size; num1= st_size % 1000; num2= st_size/1000; |