mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 18:23:21 +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;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
InitializeObjectAttributes(&ObjectAttributes,
|
|
||||||
&NtPathU,
|
|
||||||
OBJ_CASE_INSENSITIVE,
|
|
||||||
NULL,
|
|
||||||
(lpSecurityAttributes ? lpSecurityAttributes->lpSecurityDescriptor : NULL));
|
|
||||||
|
|
||||||
InitializeObjectAttributes(&ObjectAttributes,
|
InitializeObjectAttributes(&ObjectAttributes,
|
||||||
&NtTemplatePathU,
|
&NtTemplatePathU,
|
||||||
OBJ_CASE_INSENSITIVE,
|
OBJ_CASE_INSENSITIVE,
|
||||||
|
@ -256,7 +250,13 @@ OpenTemplateDir:
|
||||||
Status = STATUS_OBJECT_NAME_INVALID;
|
Status = STATUS_OBJECT_NAME_INVALID;
|
||||||
goto Cleanup;
|
goto Cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
InitializeObjectAttributes(&ObjectAttributes,
|
||||||
|
&NtPathU,
|
||||||
|
OBJ_CASE_INSENSITIVE,
|
||||||
|
NULL,
|
||||||
|
(lpSecurityAttributes ? lpSecurityAttributes->lpSecurityDescriptor : NULL));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Query the basic file attributes from the template directory
|
* Query the basic file attributes from the template directory
|
||||||
*/
|
*/
|
||||||
|
@ -358,6 +358,7 @@ OpenTemplateDir:
|
||||||
/*
|
/*
|
||||||
* Create the new directory
|
* Create the new directory
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Status = NtCreateFile (&DirectoryHandle,
|
Status = NtCreateFile (&DirectoryHandle,
|
||||||
DesiredAccess,
|
DesiredAccess,
|
||||||
&ObjectAttributes,
|
&ObjectAttributes,
|
||||||
|
@ -443,7 +444,7 @@ OpenTemplateDir:
|
||||||
|
|
||||||
/* FIXME - enumerate and copy the file streams */
|
/* FIXME - enumerate and copy the file streams */
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We successfully created the directory and copied all information
|
* We successfully created the directory and copied all information
|
||||||
* from the template directory
|
* from the template directory
|
||||||
|
@ -460,7 +461,7 @@ CleanupNoNtPath:
|
||||||
{
|
{
|
||||||
NtClose(TemplateHandle);
|
NtClose(TemplateHandle);
|
||||||
}
|
}
|
||||||
|
|
||||||
RtlFreeHeap (RtlGetProcessHeap (),
|
RtlFreeHeap (RtlGetProcessHeap (),
|
||||||
0,
|
0,
|
||||||
NtTemplatePathU.Buffer);
|
NtTemplatePathU.Buffer);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue