From 3eb3a8ed7a69bd2b90577279c1501518aa2acb82 Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Wed, 20 Aug 2014 13:07:11 +0200 Subject: [PATCH] If directory entry is a symbolic link, fall back on stat() Unlike d_type, stat() will return the type of the target of the link rather than the link itself. --- src/filelister.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/filelister.cpp b/src/filelister.cpp index cfe278f..a7a7c49 100644 --- a/src/filelister.cpp +++ b/src/filelister.cpp @@ -96,7 +96,7 @@ bool FileLister::browse(const string& path, bool clean) bool isDir; #ifdef _DIRENT_HAVE_D_TYPE - if (dptr->d_type != DT_UNKNOWN) { + if (dptr->d_type != DT_UNKNOWN && dptr->d_type != DT_LNK) { isDir = dptr->d_type == DT_DIR; } else #endif