cmd.exe: Fix running programs from root of drive.

This commit is contained in:
Jason Edmeades 2008-03-03 23:14:28 +00:00 committed by Alexandre Julliard
parent b5cc68f629
commit 52e8f6f69b
1 changed files with 4 additions and 1 deletions

View File

@ -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 */