Repository :
https://github.com/FarGroup/FarManager
On branch : master
Link :
https://github.com/FarGroup/FarManager/commit/3cda8a42f42019b6c7f625ef8dd8a3c55a55fa2a
>---------------------------------------------------------------
commit 3cda8a42f42019b6c7f625ef8dd8a3c55a55fa2a
Author: Alex Alabuzhev <
alab...@gmail.com>
Date: Sun Aug 31 18:01:54 2025 +0100
Remove dead code and redundant scopes
>---------------------------------------------------------------
3cda8a42f42019b6c7f625ef8dd8a3c55a55fa2a
far/filelist.cpp | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/far/filelist.cpp b/far/filelist.cpp
index 8ee23927e..76972185d 100644
--- a/far/filelist.cpp
+++ b/far/filelist.cpp
@@ -3041,15 +3041,16 @@ bool FileList::ChangeDir(string_view const NewDir, bool IsParent, bool ResolvePa
return SetDirectorySuccess;
}
- else
- {
+
+ // BUGBUG indentation
+
if (!equal_icase(ConvertNameToFull(strSetDir), m_CurDir))
Global->CtrlObject->FolderHistory->AddToHistory(m_CurDir);
- if (IsParent)
+ if (IsParent && RootPath)
{
- if (RootPath)
- {
+ // BUGBUG indentation
+
if (NetPath)
{
auto ShareName = m_CurDir; // strCurDir can be altered during next call
@@ -3072,9 +3073,7 @@ bool FileList::ChangeDir(string_view const NewDir, bool IsParent, bool ResolvePa
}
ChangeDisk(Parent()->ActivePanel());
return true;
- }
}
- }
strFindDir = PointToName(m_CurDir);
/*
@@ -3089,7 +3088,7 @@ bool FileList::ChangeDir(string_view const NewDir, bool IsParent, bool ResolvePa
*/
int UpdateFlags = 0;
- if (m_PanelMode != panel_mode::PLUGIN_PANEL && IsRelativeRoot(strSetDir))
+ if (IsRelativeRoot(strSetDir))
{
strSetDir = extract_root_directory(m_CurDir);
}
@@ -3144,9 +3143,6 @@ bool FileList::ChangeDir(string_view const NewDir, bool IsParent, bool ResolvePa
AnotherPanel->Redraw();
}
- if (m_PanelMode == panel_mode::PLUGIN_PANEL)
- Parent()->RedrawKeyBar();
-
return SetDirectorySuccess;
}