mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-27 03:43:36 +00:00
[SHELL32] SHELL_FindExecutable: Fix last regression from PR#7588 (#7643)
Co-authored-by: Hermès Bélusca-Maïto <[email protected]> Co-authored-by: Stanislav Motylkov <[email protected]>
This commit is contained in:
co-authored by
Hermès Bélusca-Maïto
Stanislav Motylkov
parent
853b8ebd02
commit
690643fc77
@@ -794,6 +794,14 @@ static UINT SHELL_FindExecutable(LPCWSTR lpPath, LPCWSTR lpFile, LPCWSTR lpVerb,
|
||||
TRACE("PathResolveW returned non-zero\n");
|
||||
lpFile = xlpFile;
|
||||
PathRemoveBlanksW(xlpFile);
|
||||
|
||||
/* Clear any trailing periods */
|
||||
SIZE_T i = wcslen(xlpFile);
|
||||
while (i > 0 && xlpFile[i - 1] == '.')
|
||||
{
|
||||
xlpFile[--i] = '\0';
|
||||
}
|
||||
|
||||
lstrcpyW(lpResult, xlpFile);
|
||||
/* The file was found in lpPath or one of the directories in the system-wide search path */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user