Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
May be not fully fix elfmz#2223 bug for all cases.

Thanks @spnethw and @viklequick for discussion and ideas in tg-chat
  • Loading branch information
akruphi committed May 18, 2024
1 parent 2068c46 commit 2ff3d68
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions far2l/src/findfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1672,9 +1672,19 @@ static LONG_PTR WINAPI FindDlgProc(HANDLE hDlg, int Msg, int Param1, LONG_PTR Pa
{
FileHolderPtr TFH;
if (FindItem.ArcIndex != LIST_INDEX_NONE) {
TFH = std::make_shared<FindDlg_TempFileHolder>(strSearchFileName,
FindItem.ArcIndex, FindItem.FindData);
ARCLIST ArcItem;
itd.GetArcListItem(FindItem.ArcIndex, ArcItem);
if (!(ArcItem.Flags & OPIF_REALNAMES)) { // check bug https://github.com/elfmz/far2l/issues/2223
//fprintf(stderr, "=== findfile: FindItem.ArcIndex != LIST_INDEX_NONE && !(ArcItem.Flags & OPIF_REALNAMES) => FindDlg_TempFileHolder\n");
TFH = std::make_shared<FindDlg_TempFileHolder>(strSearchFileName,
FindItem.ArcIndex, FindItem.FindData);
}
else {
//fprintf(stderr, "=== findfile: FindItem.ArcIndex != LIST_INDEX_NONE && (ArcItem.Flags & OPIF_REALNAMES) => FileHolder\n");
TFH = std::make_shared<FileHolder>(strSearchFileName);
}
} else {
//fprintf(stderr, "=== findfile: FindItem.ArcIndex == LIST_INDEX_NONE => FileHolder\n");
TFH = std::make_shared<FileHolder>(strSearchFileName);
}
FileEditor ShellEditor(TFH, CP_AUTODETECT, 0);
Expand Down

0 comments on commit 2ff3d68

Please sign in to comment.