Export to GitHub

rainmeter - issue #203

FreeDiskSpace reports total free disk space rather than free disk space available to user


Posted on Jun 14, 2012 by Happy Panda

What steps will reproduce the problem? 1. Enable disk quotas 2. Restrict the amount of space available to the user to less than the total drive space 2. User the FreeDiskSpacer measure to find the free space available to the user 3. The measure will report the total free disk space rather than the space available to the user (as controlled by the disk quota)

What is the expected output? What do you see instead? I expect to see the disk space available to the user not the total disk space.

What version of the product are you using? On what operating system? 2.2.0 r1116 64-bit (Jan 8 2012) on Windows 7 Enterprise 64Bit

Please provide any additional information below. If the problem is a related to some config option attaching a example is always a good idea. The line of code "in Library\MeasureDiskSpace.cpp" is (at time of writing) line 115: sizeResult = GetDiskFreeSpaceEx(drive, NULL, (PULARGE_INTEGER)&i64TotalBytes, (PULARGE_INTEGER)&i64FreeBytes);

The 2nd argument currently set to NULL will return the " total number of free bytes on a disk that are available to the user who is associated with the calling thread" according to this MSDN article: http://msdn.microsoft.com/en-us/library/windows/desktop/aa364937(v=vs.85).aspx

This might be better to resolve by adding an additional option to In my view this should be the default (ie user free disk space is returned rather than drive total free disk space). However, it might be better resolved by adding an additional option (like the inert option) to allow the user to choose what is returned (total free disk space or free disk space available to the user).

RainMeter is very useful to us at our school and many network environments will use disk quotas. As such this option would be very useful.

Thanks

Jim

Status: New

Labels:
Type-Defect Priority-Medium