Skip to content

Commit

Permalink
feat: go on cancel folder priority over file in comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
shunf4 committed May 13, 2024
1 parent 91f7e0c commit 6b64d12
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions CPP/7zip/UI/FileManager/BrowseDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -487,10 +487,10 @@ int CBrowseDialog::CompareItems(LPARAM lParam1, LPARAM lParam2)
const CFileInfo &f1 = _files[(int)lParam1];
const CFileInfo &f2 = _files[(int)lParam2];

bool isDir1 = f1.IsDir();
bool isDir2 = f2.IsDir();
if (isDir1 && !isDir2) return -1;
if (isDir2 && !isDir1) return 1;
// bool isDir1 = f1.IsDir();
// bool isDir2 = f2.IsDir();
// if (isDir1 && !isDir2) return -1;
// if (isDir2 && !isDir1) return 1;

int res = 0;
switch (_sortIndex)
Expand Down
4 changes: 2 additions & 2 deletions CPP/7zip/UI/FileManager/PanelSort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ int CALLBACK CompareItems(LPARAM lParam1, LPARAM lParam2, LPARAM lpData)

CPanel *panel = (CPanel*)lpData;

bool isDir1 = panel->IsItem_Folder((int)lParam1);
bool isDir2 = panel->IsItem_Folder((int)lParam2);
// bool isDir1 = panel->IsItem_Folder((int)lParam1);
// bool isDir2 = panel->IsItem_Folder((int)lParam2);

// if (isDir1 && !isDir2) return -1;
// if (isDir2 && !isDir1) return 1;
Expand Down

0 comments on commit 6b64d12

Please sign in to comment.