Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #2223 #5

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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