Commit d87a8abb authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

Replicate CreateDirectory() LastError workaround for the LFN part.

parent 229a28fc
...@@ -2105,6 +2105,21 @@ void WINAPI DOS3Call( CONTEXT86 *context ) ...@@ -2105,6 +2105,21 @@ void WINAPI DOS3Call( CONTEXT86 *context )
bSetDOSExtendedError = (!CreateDirectoryA( bSetDOSExtendedError = (!CreateDirectoryA(
CTX_SEG_OFF_TO_LIN(context, DS_reg(context), CTX_SEG_OFF_TO_LIN(context, DS_reg(context),
EDX_reg(context) ), NULL)); EDX_reg(context) ), NULL));
/* FIXME: CreateDirectory's LastErrors will clash with the ones
* used by dos. AH=39 only returns 3 (path not found) and 5 (access
* denied), while CreateDirectory return several ones. remap some of
* them. -Marcus
*/
if (bSetDOSExtendedError) {
switch (GetLastError()) {
case ERROR_ALREADY_EXISTS:
case ERROR_FILENAME_EXCED_RANGE:
case ERROR_DISK_FULL:
SetLastError(ERROR_ACCESS_DENIED);
break;
default: break;
}
}
break; break;
case 0x3a: /* Remove directory */ case 0x3a: /* Remove directory */
TRACE("LONG FILENAME - REMOVE DIRECTORY %s\n", TRACE("LONG FILENAME - REMOVE DIRECTORY %s\n",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment