From 4b8856d2ac360824c0ea35e3957cd1425e0da46d Mon Sep 17 00:00:00 2001 From: Ivan Date: Tue, 17 Dec 2024 22:41:05 +0400 Subject: [PATCH] fix #2581: Far2l crash in Quick view when try show broken symlink --- far2l/src/panels/qview.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/far2l/src/panels/qview.cpp b/far2l/src/panels/qview.cpp index 8dab00992..f45d4f08b 100644 --- a/far2l/src/panels/qview.cpp +++ b/far2l/src/panels/qview.cpp @@ -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);