mirror of https://github.com/BOINC/boinc.git
- client: fix disk-space accounting bug when user quotas in use
(Windows) svn path=/trunk/boinc/; revision=23079
This commit is contained in:
parent
faddad7bbb
commit
22e0b9172b
|
@ -969,3 +969,10 @@ David 20 Feb 2011
|
||||||
|
|
||||||
samples/wrapper/
|
samples/wrapper/
|
||||||
wrapper.cpp
|
wrapper.cpp
|
||||||
|
|
||||||
|
David 20 Feb 2011
|
||||||
|
- client: fix disk-space accounting bug when user quotas in use
|
||||||
|
(Windows)
|
||||||
|
|
||||||
|
lib/
|
||||||
|
filesys.cpp
|
||||||
|
|
|
@ -750,13 +750,13 @@ int get_filesystem_info(double &total_space, double &free_space, char*) {
|
||||||
if (pGetDiskFreeSpaceEx) {
|
if (pGetDiskFreeSpaceEx) {
|
||||||
ULARGE_INTEGER TotalNumberOfFreeBytes;
|
ULARGE_INTEGER TotalNumberOfFreeBytes;
|
||||||
ULARGE_INTEGER TotalNumberOfBytes;
|
ULARGE_INTEGER TotalNumberOfBytes;
|
||||||
ULARGE_INTEGER TotalNumberOfBytesFreeToCaller;
|
ULARGE_INTEGER FreeBytesAvailable;
|
||||||
pGetDiskFreeSpaceEx(
|
pGetDiskFreeSpaceEx(
|
||||||
buf, &TotalNumberOfBytesFreeToCaller, &TotalNumberOfBytes,
|
buf, &FreeBytesAvailable, &TotalNumberOfBytes,
|
||||||
&TotalNumberOfFreeBytes
|
&TotalNumberOfFreeBytes
|
||||||
);
|
);
|
||||||
signed __int64 uMB;
|
signed __int64 uMB;
|
||||||
uMB = TotalNumberOfFreeBytes.QuadPart / (1024 * 1024);
|
uMB = FreeBytesAvailable.QuadPart / (1024 * 1024);
|
||||||
free_space = uMB * 1024.0 * 1024.0;
|
free_space = uMB * 1024.0 * 1024.0;
|
||||||
uMB = TotalNumberOfBytes.QuadPart / (1024 * 1024);
|
uMB = TotalNumberOfBytes.QuadPart / (1024 * 1024);
|
||||||
total_space = uMB * 1024.0 * 1024.0;
|
total_space = uMB * 1024.0 * 1024.0;
|
||||||
|
|
Loading…
Reference in New Issue