Module: wine Branch: master Commit: 52e8f6f69b3a6766c278d4c085ba728e6199547f URL: http://source.winehq.org/git/wine.git/?a=commit;h=52e8f6f69b3a6766c278d4c085...
Author: Jason Edmeades jason.edmeades@googlemail.com Date: Mon Mar 3 23:14:28 2008 +0000
cmd.exe: Fix running programs from root of drive.
---
programs/cmd/wcmdmain.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c index 2966bcc..36faa8b 100644 --- a/programs/cmd/wcmdmain.c +++ b/programs/cmd/wcmdmain.c @@ -962,8 +962,11 @@ void WCMD_run_program (WCHAR *command, int called) { GetFullPathName(param1, sizeof(pathtosearch)/sizeof(WCHAR), pathtosearch, NULL); lastSlash = strrchrW(pathtosearch, '\'); if (lastSlash && strchrW(lastSlash, '.') != NULL) extensionsupplied = TRUE; - if (lastSlash) *lastSlash = 0x00; strcpyW(stemofsearch, lastSlash+1); + + /* Reduce pathtosearch to a path with trailing '' to support c:\a.bat and + c:\windows\a.bat syntax */ + if (lastSlash) *(lastSlash + 1) = 0x00; }
/* Now extract PATHEXT */