[Bug 3015] New: CreateDirectory() creates "C:" with incorrect GetLastError() value

Wine Bugs wine-bugs at winehq.org
Sun May 29 20:49:15 CDT 2005


http://bugs.winehq.org/show_bug.cgi?id=3015

           Summary: CreateDirectory() creates "C:" with incorrect
                    GetLastError() value
           Product: Wine
           Version: 20050419
          Platform: Other
        OS/Version: other
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: wine-kernel
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: mark7 at alumni.cmu.edu


CreateDirectory() appears to return a different GetLastError() value in Wine and
Windows for the root of a drive.  This causes several installers I've used to
fail.  The following example code spits out a GetLastError() value of 5
(ERROR_ACCESS_DENIED) on my Linux box, and 183 (ERROR_ALREADY_EXISTS) on a
friend's Windows box (sorry, didn't check which version of Windows, but almost
certainly XP).  The same thing happens with "C:" or "C:\".  Wine does seem to
correctly return ERROR_ALREADY_EXISTS for other (non-root-of-a-Wine-drive)
directories that already exist, like "C:\Program Files".

#include <windows.h>
#include <stdio.h>

int main(void)
{
	int retval;
	int errcode;
	
	retval = CreateDirectory("C:", 0);
	errcode = GetLastError();
	
	printf("retval is %d, getlasterror is %d\n", retval, errcode);
}

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the wine-bugs mailing list