Skip to content

Commit 13d1802

Browse files
committed
[SHELL32] SHELL_FindExecutable: Fix last regression from PR#7588
1 parent aebaa14 commit 13d1802

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

dll/win32/shell32/shlexec.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -802,6 +802,15 @@ static UINT SHELL_FindExecutable(LPCWSTR lpPath, LPCWSTR lpFile, LPCWSTR lpVerb,
802802
xlpFile[0] = '\0';
803803
}
804804

805+
/* Clear any trailing periods */
806+
for (INT i = wcslen(xlpFile); i >= 0; i--)
807+
{
808+
if (i > 0 && xlpFile[i - 1] == '.')
809+
xlpFile[i - 1] = 0;
810+
else
811+
break;
812+
}
813+
805814
attribs = GetFileAttributesW(lpFile);
806815
if (attribs != INVALID_FILE_ATTRIBUTES && (attribs & FILE_ATTRIBUTE_DIRECTORY))
807816
{

0 commit comments

Comments
 (0)