Skip to content

Commit

Permalink
Fix an issue where clicking the Left/Right Shell Menu menu item would…
Browse files Browse the repository at this point in the history
… sometimes not show the shell menu
  • Loading branch information
sdottaka committed Sep 7, 2023
1 parent 0fc9f3f commit c0a9286
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 1 addition & 5 deletions Src/Common/ShellContextMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ bool CShellContextMenu::QueryShellContextMenu()

String currentDir = file.path;

if (parentDir.empty()) // first iteration, initialize parentDir and pCurrFolder
if (currentDir != parentDir)
{
parentDir = currentDir;

Expand All @@ -150,10 +150,6 @@ bool CShellContextMenu::QueryShellContextMenu()
return false;
}
}
else if (currentDir != parentDir) // check whether file belongs to the same parentDir, break otherwise
{
return false;
}

LPITEMIDLIST pidl;
if (FAILED(/*hr = */pCurrFolder->ParseDisplayName(nullptr,
Expand Down
3 changes: 2 additions & 1 deletion Src/DirActions.h
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,8 @@ void ApplyFolderNameAndFileName(const InputIterator& begin, const InputIterator&
for (InputIterator it = begin; it != end; ++it)
{
const DIFFITEM& di = *it;
if (di.diffcode.diffcode == 0) // Invalid value, this must be special item
if (di.diffcode.diffcode == 0 /* Invalid value, this must be special item */ ||
!di.diffcode.exists(index))
continue;
String filename = di.diffFileInfo[index].filename;
String currentDir = di.getFilepath(index, ctxt.GetNormalizedPath(index));
Expand Down

0 comments on commit c0a9286

Please sign in to comment.