Alexandre Julliard : explorer: Specify the full application path when starting winefile.exe.

Alexandre Julliard julliard at winehq.org
Tue Oct 27 09:46:32 CDT 2009


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Oct 27 11:22:51 2009 +0100

explorer: Specify the full application path when starting winefile.exe.

---

 programs/explorer/explorer.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/programs/explorer/explorer.c b/programs/explorer/explorer.c
index c8c3ea0..16dcf72 100644
--- a/programs/explorer/explorer.c
+++ b/programs/explorer/explorer.c
@@ -151,6 +151,7 @@ int WINAPI wWinMain(HINSTANCE hinstance,
     BOOL rc;
     static const WCHAR winefile[] = {'\\','w','i','n','e','f','i','l','e','.','e','x','e',0};
     static const WCHAR space[] = {' ',0};
+    WCHAR app[MAX_PATH];
     LPWSTR winefile_commandline = NULL;
     DWORD len = 0;
 
@@ -164,8 +165,9 @@ int WINAPI wWinMain(HINSTANCE hinstance,
     else if (parameters.root[0]) len += lstrlenW(parameters.root) + 3;
 
     winefile_commandline = HeapAlloc(GetProcessHeap(),0,len*sizeof(WCHAR));
-    GetSystemDirectoryW( winefile_commandline, len );
-    lstrcatW(winefile_commandline,winefile);
+    GetSystemDirectoryW( app, MAX_PATH - sizeof(winefile)/sizeof(WCHAR) );
+    strcatW( app, winefile );
+    strcpyW( winefile_commandline, app );
 
     if (parameters.selection[0])
     {
@@ -183,7 +185,7 @@ int WINAPI wWinMain(HINSTANCE hinstance,
         }
     }
 
-    rc = CreateProcessW(NULL, winefile_commandline, NULL, NULL, FALSE, 0, NULL,
+    rc = CreateProcessW(app, winefile_commandline, NULL, NULL, FALSE, 0, NULL,
                         parameters.root[0] ? parameters.root:NULL, &si, &info);
 
     HeapFree(GetProcessHeap(),0,winefile_commandline);




More information about the wine-cvs mailing list