Commit 52e8f6f6 authored by Jason Edmeades's avatar Jason Edmeades Committed by Alexandre Julliard

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

parent b5cc68f6
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment