ntdll: Don't fail to load data file when the registry key is missing.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48188 Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
7bb286ad9d
commit
1902ab4d85
|
@ -160,17 +160,19 @@ static NTSTATUS open_nls_data_file( ULONG type, ULONG id, HANDLE *file )
|
|||
RtlInitUnicodeString( &nameW, buffer );
|
||||
RtlInitUnicodeString( &valueW, value );
|
||||
InitializeObjectAttributes( &attr, &nameW, 0, 0, NULL );
|
||||
if ((status = NtOpenKey( &handle, KEY_READ, &attr ))) return status;
|
||||
info = (KEY_VALUE_PARTIAL_INFORMATION *)buffer;
|
||||
size = sizeof(buffer) - sizeof(WCHAR);
|
||||
status = NtQueryValueKey( handle, &valueW, KeyValuePartialInformation, info, size, &size );
|
||||
NtClose( handle );
|
||||
if (!status)
|
||||
if (!(status = NtOpenKey( &handle, KEY_READ, &attr )))
|
||||
{
|
||||
((WCHAR *)info->Data)[info->DataLength / sizeof(WCHAR)] = 0;
|
||||
name = (WCHAR *)info->Data;
|
||||
info = (KEY_VALUE_PARTIAL_INFORMATION *)buffer;
|
||||
size = sizeof(buffer) - sizeof(WCHAR);
|
||||
if (!(status = NtQueryValueKey( handle, &valueW, KeyValuePartialInformation, info, size, &size )))
|
||||
{
|
||||
((WCHAR *)info->Data)[info->DataLength / sizeof(WCHAR)] = 0;
|
||||
name = (WCHAR *)info->Data;
|
||||
}
|
||||
NtClose( handle );
|
||||
}
|
||||
else /* otherwise some hardcoded defaults */
|
||||
|
||||
if (!name) /* otherwise some hardcoded defaults */
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue