mirror of
https://github.com/reactos/reactos.git
synced 2024-12-31 19:42:51 +00:00
[USETUP] Use correct flags for the NtCreateFile call that creates new file directories.
DIRECTORY_ALL_ACCESS is not the correct flag, because it is used with the NtCreateDirectoryObject API that creates virtual "directories" in the NT object namespace; that's not our purpose here. svn path=/branches/setup_improvements/; revision=74716
This commit is contained in:
parent
cacae6d9a0
commit
6f185c5fe2
1 changed files with 3 additions and 3 deletions
|
@ -30,7 +30,7 @@ SetupCreateSingleDirectory(
|
||||||
HANDLE DirectoryHandle;
|
HANDLE DirectoryHandle;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
if(!RtlCreateUnicodeString(&PathName, DirectoryName))
|
if (!RtlCreateUnicodeString(&PathName, DirectoryName))
|
||||||
return STATUS_NO_MEMORY;
|
return STATUS_NO_MEMORY;
|
||||||
|
|
||||||
if (PathName.Length > sizeof(WCHAR) &&
|
if (PathName.Length > sizeof(WCHAR) &&
|
||||||
|
@ -55,14 +55,14 @@ SetupCreateSingleDirectory(
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
Status = NtCreateFile(&DirectoryHandle,
|
Status = NtCreateFile(&DirectoryHandle,
|
||||||
DIRECTORY_ALL_ACCESS,
|
FILE_LIST_DIRECTORY | SYNCHRONIZE,
|
||||||
&ObjectAttributes,
|
&ObjectAttributes,
|
||||||
&IoStatusBlock,
|
&IoStatusBlock,
|
||||||
NULL,
|
NULL,
|
||||||
FILE_ATTRIBUTE_DIRECTORY,
|
FILE_ATTRIBUTE_DIRECTORY,
|
||||||
FILE_SHARE_READ | FILE_SHARE_WRITE,
|
FILE_SHARE_READ | FILE_SHARE_WRITE,
|
||||||
FILE_OPEN_IF,
|
FILE_OPEN_IF,
|
||||||
FILE_DIRECTORY_FILE,
|
FILE_OPEN_FOR_BACKUP_INTENT | FILE_DIRECTORY_FILE,
|
||||||
NULL,
|
NULL,
|
||||||
0);
|
0);
|
||||||
if (NT_SUCCESS(Status))
|
if (NT_SUCCESS(Status))
|
||||||
|
|
Loading…
Reference in a new issue