File.getFreeSpace violates specification if quotas are in effect (win)

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 25
    • Affects Version/s: 24
    • Component/s: core-libs
    • None
    • b10
    • windows

      Concerning the value returned by getFreeSpace, its specification states:

      "This value will be less than or equal to the total file system size returned by getTotalSpace()."

      The value returned by getFreeSpace however is obtained from the TotalNumberOfFreeBytes parameter

      "[...] a variable that receives the total number of free bytes on a disk"

      of the GetDiskFreeSpaceExW function, which does not account for quotas, whereas the value returned by getTotalSpace is derived from the TotalNumberOfBytes parameter which, per its specification, is subject to quotas:

      "If per-user quotas are being used, this value may be less than the total number of bytes on a disk."

            Assignee:
            Brian Burkhalter
            Reporter:
            Brian Burkhalter
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: