[Bug 37408] New: GetDiskFreeSpaceExW - Does not accept path to file

wine-bugs at winehq.org wine-bugs at winehq.org
Wed Oct 15 21:43:24 CDT 2014


https://bugs.winehq.org/show_bug.cgi?id=37408

            Bug ID: 37408
           Summary: GetDiskFreeSpaceExW - Does not accept path to file
           Product: Wine
           Version: 1.7.28
          Hardware: x86
                OS: Mac OS X
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: kernel32
          Assignee: wine-bugs at winehq.org
          Reporter: james.d at hexhost.net

Created attachment 49751
  --> https://bugs.winehq.org/attachment.cgi?id=49751
Trace Log

According to standard Microsoft documentation the GetDiskFreeSpaceExW WINAPI
call should fail if a directory is not given as the path to check free disk
space for. The documentation is incorrect. Making a call to GetDiskFreeSpaceExW
with a full path to a file (and not a directory) does indeed succeed on
standard windows. 

Doing this in Wine on Mac OSX results in open_device_root being called on a non
directory path and that non directory path makes it all the way to the
wineserver request to open the path with a type of FILE_DIRECTORY_FILE. Which
in turn gets an error from wineserver of NOT_A_DIRECTORY as expected.

Here is a unwinding of the code to show what is happening:

http://source.winehq.org/source/server/fd.c#1839
http://source.winehq.org/source/dlls/ntdll/file.c#0112
http://source.winehq.org/source/dlls/ntdll/file.c#0242
http://source.winehq.org/source/dlls/kernel32/volume.c#0174
http://source.winehq.org/source/dlls/kernel32/volume.c#1681

Attached is a use case example.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list