mirror of
https://github.com/reactos/reactos.git
synced 2025-04-26 00:20:34 +00:00
- Set error code if directory does not exist
- NtCreateFile -> NtOpenFile svn path=/trunk/; revision=40867
This commit is contained in:
parent
619d40264f
commit
794ebcc089
1 changed files with 10 additions and 14 deletions
|
@ -531,7 +531,10 @@ RemoveDirectoryW (
|
|||
&NtPathU,
|
||||
NULL,
|
||||
NULL))
|
||||
{
|
||||
SetLastError(ERROR_PATH_NOT_FOUND);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
&NtPathU,
|
||||
|
@ -541,21 +544,14 @@ RemoveDirectoryW (
|
|||
|
||||
TRACE("NtPathU '%S'\n", NtPathU.Buffer);
|
||||
|
||||
Status = NtCreateFile (&DirectoryHandle,
|
||||
DELETE,
|
||||
&ObjectAttributes,
|
||||
&IoStatusBlock,
|
||||
NULL,
|
||||
FILE_ATTRIBUTE_DIRECTORY, /* 0x7 */
|
||||
0,
|
||||
FILE_OPEN,
|
||||
FILE_DIRECTORY_FILE, /* 0x204021 */
|
||||
NULL,
|
||||
0);
|
||||
Status = NtOpenFile(&DirectoryHandle,
|
||||
DELETE,
|
||||
&ObjectAttributes,
|
||||
&IoStatusBlock,
|
||||
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
|
||||
FILE_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT);
|
||||
|
||||
RtlFreeHeap (RtlGetProcessHeap (),
|
||||
0,
|
||||
NtPathU.Buffer);
|
||||
RtlFreeUnicodeString(&NtPathU);
|
||||
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue