FIX: IContextMenu::InvokeCommand ignore E_FAIL return code (fixes #345)

(cherry picked from commit 3f4f630332)
This commit is contained in:
Alexander Koblov 2022-02-06 12:04:28 +03:00
commit 5b951aa8d5

View file

@ -755,8 +755,16 @@ begin
end;
Result := FShellMenu1.InvokeCommand(lpici);
if not (Succeeded(Result) or (Result = COPYENGINE_E_USER_CANCELLED)) then
OleErrorUTF8(Result);
if not Succeeded(Result) then
begin
case Result of
COPYENGINE_E_USER_CANCELLED,
E_FAIL: ; // Ignore
else
OleErrorUTF8(Result);
end;
end;
// Reload after possible changes on the filesystem.
if SameText(sVerb, sCmdVerbLink) or SameText(sVerb, sCmdVerbDelete) then