diff --git a/Src/Common/ShellContextMenu.cpp b/Src/Common/ShellContextMenu.cpp index bf1ee907dfa..f822d6ba5fd 100644 --- a/Src/Common/ShellContextMenu.cpp +++ b/Src/Common/ShellContextMenu.cpp @@ -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; @@ -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, diff --git a/Src/DirActions.h b/Src/DirActions.h index 8b183778039..4ebb75578fa 100644 --- a/Src/DirActions.h +++ b/Src/DirActions.h @@ -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));