Close only the Nls directory handle if the directory was created.

svn path=/trunk/; revision=14835
This commit is contained in:
Hartmut Birr 2005-04-27 21:55:02 +00:00
parent 5e1d995563
commit a6d944ecfc

View file

@ -93,8 +93,10 @@ NlsInit()
InitializeObjectAttributes(&ObjectAttributes, &DirName,
OBJ_CASE_INSENSITIVE | OBJ_PERMANENT,
NULL, NULL);
NtCreateDirectoryObject(&Handle, DIRECTORY_ALL_ACCESS, &ObjectAttributes);
NtClose(Handle);
if (NT_SUCCESS(NtCreateDirectoryObject(&Handle, DIRECTORY_ALL_ACCESS, &ObjectAttributes)))
{
NtClose(Handle);
}
/* Setup ANSI code page. */
AnsiCodePage.CodePage = CP_ACP;