Skip to content

Commit

Permalink
fix #2581: Far2l crash in Quick view when try show broken symlink
Browse files Browse the repository at this point in the history
  • Loading branch information
spnethw committed Dec 17, 2024
1 parent 06868bf commit 4b8856d
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 4b8856d

Please sign in to comment.