(svn r15104) -Codechange: unify the resolving of the xyz kbytes/megabytes strings.

This commit is contained in:
rubidium
2009-01-16 12:59:47 +00:00
parent cdd3676478
commit b1a33a494f
57 changed files with 138 additions and 114 deletions

View File

@@ -843,7 +843,7 @@ bool FiosIsHiddenFile(const struct dirent *ent)
return (ent->dir->fd.dwFileAttributes & (FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM)) != 0;
}
bool FiosGetDiskFreeSpace(const char *path, uint32 *tot)
bool FiosGetDiskFreeSpace(const char *path, uint64 *tot)
{
UINT sem = SetErrorMode(SEM_FAILCRITICALERRORS); // disable 'no-disk' message box
bool retval = false;
@@ -852,7 +852,7 @@ bool FiosGetDiskFreeSpace(const char *path, uint32 *tot)
_sntprintf(root, lengthof(root), _T("%c:") _T(PATHSEP), path[0]);
if (tot != NULL && GetDiskFreeSpace(root, &spc, &bps, &nfc, &tnc)) {
*tot = ((spc * bps) * (uint64)nfc) >> 20;
*tot = ((spc * bps) * (uint64)nfc);
retval = true;
}