shell32: Fix FindExecutable() to return the executable path, not the whole command.
This commit is contained in:
parent
65b81bebaa
commit
71e5f3c116
|
@ -707,6 +707,16 @@ UINT SHELL_FindExecutable(LPCWSTR lpPath, LPCWSTR lpFile, LPCWSTR lpOperation,
|
|||
}
|
||||
*p = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Truncate on first space, like Windows:
|
||||
* http://support.microsoft.com/?scid=kb%3Ben-us%3B140724
|
||||
*/
|
||||
WCHAR *p = lpResult;
|
||||
while (*p != ' ' && *p != '\0')
|
||||
p++;
|
||||
*p='\0';
|
||||
}
|
||||
}
|
||||
}
|
||||
else /* Check win.ini */
|
||||
|
|
|
@ -498,24 +498,24 @@ static filename_tests_t filename_tests[]=
|
|||
{NULL, "%s\\nonexistent.noassoc", 0x11, SE_ERR_FNF},
|
||||
|
||||
/* Standard tests */
|
||||
{NULL, "%s\\test file.shlexec", 0x20, 33},
|
||||
{NULL, "%s\\test file.shlexec.", 0x20, 33},
|
||||
{NULL, "%s\\%%nasty%% $file.shlexec", 0x20, 33},
|
||||
{NULL, "%s/test file.shlexec", 0x20, 33},
|
||||
{NULL, "%s\\test file.shlexec", 0x0, 33},
|
||||
{NULL, "%s\\test file.shlexec.", 0x0, 33},
|
||||
{NULL, "%s\\%%nasty%% $file.shlexec", 0x0, 33},
|
||||
{NULL, "%s/test file.shlexec", 0x0, 33},
|
||||
|
||||
/* Test filenames with no association */
|
||||
{NULL, "%s\\test file.noassoc", 0x0, SE_ERR_NOASSOC},
|
||||
|
||||
/* Test double extensions */
|
||||
{NULL, "%s\\test file.noassoc.shlexec", 0x20, 33},
|
||||
{NULL, "%s\\test file.noassoc.shlexec", 0x0, 33},
|
||||
{NULL, "%s\\test file.shlexec.noassoc", 0x0, SE_ERR_NOASSOC},
|
||||
|
||||
/* Test alternate verbs */
|
||||
{"LowerL", "%s\\nonexistent.shlexec", 0x11, SE_ERR_FNF},
|
||||
{"LowerL", "%s\\test file.noassoc", 0x0, SE_ERR_NOASSOC},
|
||||
|
||||
{"QuotedLowerL", "%s\\test file.shlexec", 0x20, 33},
|
||||
{"QuotedUpperL", "%s\\test file.shlexec", 0x20, 33},
|
||||
{"QuotedLowerL", "%s\\test file.shlexec", 0x0, 33},
|
||||
{"QuotedUpperL", "%s\\test file.shlexec", 0x0, 33},
|
||||
|
||||
{NULL, NULL, 0}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue