Skip to content

Commit

Permalink
Merge pull request #2582 from spnethw/fix_2581_far2l_crash_in_quick_v…
Browse files Browse the repository at this point in the history
…iew_when_try_show_broken_symlink

fix #2581: Far2l crash in Quick view when try show broken symlink
  • Loading branch information
elfmz authored Dec 22, 2024
2 parents 0b36cef + 4b8856d commit d85cab7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions far2l/src/panels/qview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,9 @@ void QuickView::ShowFile(const wchar_t *FileName, int TempFile, HANDLE hDirPlugi

if (!hDirPlugin) {
FileAttr = apiGetFileAttributes(FileName);
if (FileAttr != INVALID_FILE_ATTRIBUTES && (FileAttr & FILE_ATTRIBUTE_DEVICE) != 0) // avoid stuck
return;
if (FileAttr != INVALID_FILE_ATTRIBUTES
&& ((FileAttr & FILE_ATTRIBUTE_DEVICE) != 0 || (FileAttr & FILE_ATTRIBUTE_BROKEN) != 0) )
return; // avoid stuck
}

bool SameFile = !StrCmp(strCurFileName, FileName);
Expand Down

0 comments on commit d85cab7

Please sign in to comment.