Damjan Jovanovic : ntdll: Use the win16 current directory for win16 processes.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Jul 13 08:30:19 CDT 2007


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

Author: Damjan Jovanovic <damjan.jov at gmail.com>
Date:   Thu Jul 12 07:27:25 2007 +0200

ntdll: Use the win16 current directory for win16 processes.

---

 dlls/ntdll/env.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/dlls/ntdll/env.c b/dlls/ntdll/env.c
index fd6f185..cc2a1f5 100644
--- a/dlls/ntdll/env.c
+++ b/dlls/ntdll/env.c
@@ -29,6 +29,7 @@
 #include "winternl.h"
 #include "wine/unicode.h"
 #include "wine/debug.h"
+#include "thread.h"
 #include "ntdll_misc.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(environ);
@@ -431,7 +432,13 @@ NTSTATUS WINAPI RtlCreateProcessParameters( RTL_USER_PROCESS_PARAMETERS **result
     RtlAcquirePebLock();
     cur_params = NtCurrentTeb()->Peb->ProcessParameters;
     if (!DllPath) DllPath = &cur_params->DllPath;
-    if (!CurrentDirectoryName) CurrentDirectoryName = &cur_params->CurrentDirectory.DosPath;
+    if (!CurrentDirectoryName)
+    {
+        if (NtCurrentTeb()->Tib.SubSystemTib)  /* FIXME: hack */
+            CurrentDirectoryName = &((WIN16_SUBSYSTEM_TIB *)NtCurrentTeb()->Tib.SubSystemTib)->curdir.DosPath;
+        else
+            CurrentDirectoryName = &cur_params->CurrentDirectory.DosPath;
+    }
     if (!CommandLine) CommandLine = ImagePathName;
     if (!Environment) Environment = cur_params->Environment;
     if (!WindowTitle) WindowTitle = &empty_str;




More information about the wine-cvs mailing list