1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-11-22 01:13:10 +02:00

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.
This commit is contained in:
Maarten ter Huurne 2014-08-20 13:07:11 +02:00
parent 5758209170
commit 3eb3a8ed7a

View File

@ -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