[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-cvs
Subject:    Alexandre Julliard : kernel32: Only change the Unix current after exec_process to make sure it' s in
From:       Alexandre Julliard <julliard () winehq ! org>
Date:       2012-01-31 20:06:19
Message-ID: E1RsJy7-0002KK-4P () wine ! codeweavers ! com
[Download RAW message or body]

Module: wine
Branch: master
Commit: e31dd6dba1e77ca0d2a6073424a0cf65c8f82ab5
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=e31dd6dba1e77ca0d2a6073424a0cf65c8f82ab5

Author: Alexandre Julliard <julliard@winehq.org>
Date:   Tue Jan 31 13:44:40 2012 +0100

kernel32: Only change the Unix current after exec_process to make sure it's inherited properly.

---

 dlls/kernel32/process.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c
index ad389ec..21f0817 100644
--- a/dlls/kernel32/process.c
+++ b/dlls/kernel32/process.c
@@ -904,7 +904,6 @@ static void init_current_directory( CURDIR *cur_dir )
     HeapFree( GetProcessHeap(), 0, cwd );
 
 done:
-    if (!cur_dir->Handle) chdir("/"); /* change to root directory so as not to lock cdroms */
     TRACE( "starting in %s %p\n", debugstr_w( cur_dir->DosPath.Buffer ), cur_dir->Handle );
 }
 
@@ -1251,6 +1250,8 @@ void CDECL __wine_kernel_init(void)
         ExitProcess( error );
     }
 
+    if (!params->CurrentDirectory.Handle) chdir("/"); /* avoid locking removable devices */
+
     LdrInitializeThunk( start_process, 0, 0, 0 );
 
  error:



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic