cmd.exe: Fix running programs from root of drive.
This commit is contained in:
parent
b5cc68f629
commit
52e8f6f69b
|
@ -962,8 +962,11 @@ void WCMD_run_program (WCHAR *command, int called) {
|
||||||
GetFullPathName(param1, sizeof(pathtosearch)/sizeof(WCHAR), pathtosearch, NULL);
|
GetFullPathName(param1, sizeof(pathtosearch)/sizeof(WCHAR), pathtosearch, NULL);
|
||||||
lastSlash = strrchrW(pathtosearch, '\\');
|
lastSlash = strrchrW(pathtosearch, '\\');
|
||||||
if (lastSlash && strchrW(lastSlash, '.') != NULL) extensionsupplied = TRUE;
|
if (lastSlash && strchrW(lastSlash, '.') != NULL) extensionsupplied = TRUE;
|
||||||
if (lastSlash) *lastSlash = 0x00;
|
|
||||||
strcpyW(stemofsearch, lastSlash+1);
|
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 */
|
/* Now extract PATHEXT */
|
||||||
|
|
Loading…
Reference in New Issue