mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
Bug 1456 : patch from w3seek : Fix a bug in CreateDirectoryEx that makes the function attempt to create the template directory again
svn path=/trunk/; revision=21835
This commit is contained in:
parent
bad04e557d
commit
b8c0b29fc9
1 changed files with 10 additions and 9 deletions
|
@ -191,12 +191,6 @@ CreateDirectoryExW (
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
&NtPathU,
|
||||
OBJ_CASE_INSENSITIVE,
|
||||
NULL,
|
||||
(lpSecurityAttributes ? lpSecurityAttributes->lpSecurityDescriptor : NULL));
|
||||
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
&NtTemplatePathU,
|
||||
OBJ_CASE_INSENSITIVE,
|
||||
|
@ -256,7 +250,13 @@ OpenTemplateDir:
|
|||
Status = STATUS_OBJECT_NAME_INVALID;
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
&NtPathU,
|
||||
OBJ_CASE_INSENSITIVE,
|
||||
NULL,
|
||||
(lpSecurityAttributes ? lpSecurityAttributes->lpSecurityDescriptor : NULL));
|
||||
|
||||
/*
|
||||
* Query the basic file attributes from the template directory
|
||||
*/
|
||||
|
@ -358,6 +358,7 @@ OpenTemplateDir:
|
|||
/*
|
||||
* Create the new directory
|
||||
*/
|
||||
|
||||
Status = NtCreateFile (&DirectoryHandle,
|
||||
DesiredAccess,
|
||||
&ObjectAttributes,
|
||||
|
@ -443,7 +444,7 @@ OpenTemplateDir:
|
|||
|
||||
/* FIXME - enumerate and copy the file streams */
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* We successfully created the directory and copied all information
|
||||
* from the template directory
|
||||
|
@ -460,7 +461,7 @@ CleanupNoNtPath:
|
|||
{
|
||||
NtClose(TemplateHandle);
|
||||
}
|
||||
|
||||
|
||||
RtlFreeHeap (RtlGetProcessHeap (),
|
||||
0,
|
||||
NtTemplatePathU.Buffer);
|
||||
|
|
Loading…
Reference in a new issue