ntdll: Initialize file redirects only after the server is connected.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49380 Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
c3e2013b61
commit
98eab245d3
|
@ -2689,7 +2689,7 @@ static void init_redirects(void)
|
|||
char *dir;
|
||||
struct stat st;
|
||||
|
||||
if (!(dir = RtlAllocateHeap( GetProcessHeap(), 0, strlen(config_dir) + sizeof(windows_dir) ))) return;
|
||||
if (!(dir = malloc( strlen(config_dir) + sizeof(windows_dir) ))) return;
|
||||
strcpy( dir, config_dir );
|
||||
strcat( dir, windows_dir );
|
||||
if (!stat( dir, &st ))
|
||||
|
@ -2699,7 +2699,7 @@ static void init_redirects(void)
|
|||
nb_redirects = ARRAY_SIZE( redirects );
|
||||
}
|
||||
else ERR( "%s: %s\n", dir, strerror(errno) );
|
||||
RtlFreeHeap( GetProcessHeap(), 0, dir );
|
||||
free( dir );
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1227,7 +1227,6 @@ void __wine_main( int argc, char *argv[], char *envp[] )
|
|||
fixup_ntdll_imports( &__wine_spec_nt_header, module );
|
||||
|
||||
init_environment( argc, argv, envp );
|
||||
init_files();
|
||||
|
||||
#ifdef __APPLE__
|
||||
apple_main_thread();
|
||||
|
@ -1262,7 +1261,6 @@ NTSTATUS __cdecl __wine_init_unix_lib( HMODULE module, const void *ptr_in, void
|
|||
map_so_dll( nt, module );
|
||||
fixup_ntdll_imports( &__wine_spec_nt_header, module );
|
||||
init_environment( __wine_main_argc, __wine_main_argv, envp );
|
||||
init_files();
|
||||
*(struct unix_funcs **)ptr_out = &unix_funcs;
|
||||
wine_mmap_enum_reserved_areas( add_area, NULL, 0 );
|
||||
return STATUS_SUCCESS;
|
||||
|
|
|
@ -110,6 +110,7 @@ TEB * CDECL init_threading( int *nb_threads_ptr, struct ldt_copy **ldt_copy, SIZ
|
|||
server_init_process();
|
||||
info_size = server_init_thread( teb->Peb, suspend );
|
||||
virtual_map_user_shared_data();
|
||||
init_files();
|
||||
NtCreateKeyedEvent( &keyed_event, GENERIC_READ | GENERIC_WRITE, NULL, 0 );
|
||||
|
||||
if (size) *size = info_size;
|
||||
|
|
Loading…
Reference in New Issue