[PATCH 4/4] CMD.EXE: Fix regression when launching a fully qualified program [bug#8020]

Jason Edmeades us at edmeades.me.uk
Wed Apr 11 16:25:54 CDT 2007


Eg c:\windows\fred.bat fails to find fred.bat, whereas c:\windows\fred or
fred or fred.bat all work. This fixes a regression I introduced with an
earlier (comitted) patch.
---
 programs/cmd/wcmdmain.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c
index 44195a5..5ef6ef6 100644
--- a/programs/cmd/wcmdmain.c
+++ b/programs/cmd/wcmdmain.c
@@ -837,8 +837,8 @@ void WCMD_run_program (char *command, int called) {
     /* Convert eg. ..\fred to include a directory by removing file part */
     GetFullPathName(param1, sizeof(pathtosearch), pathtosearch, NULL);
     lastSlash = strrchr(pathtosearch, '\\');
+    if (lastSlash && strchr(lastSlash, '.') != NULL) extensionsupplied = TRUE;
     if (lastSlash) *lastSlash = 0x00;
-    if (strchr(lastSlash, '.') != NULL) extensionsupplied = TRUE;
     strcpy(stemofsearch, lastSlash+1);
   }
 
-- 
1.5.0




More information about the wine-patches mailing list