]> Sergey Matveev's repositories - nnn.git/commitdiff
Fix some directories not opening
authorucs <git-51d@ug0.fr>
Mon, 10 Aug 2020 11:02:47 +0000 (13:02 +0200)
committerucs <git-51d@ug0.fr>
Mon, 10 Aug 2020 11:02:47 +0000 (13:02 +0200)
src/nnn.c

index 0e0e54a3c11abd765beb887d0891d379f064276d..9fe153a79d47e043cc03f869c7dadbd404e7894c 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -4970,7 +4970,7 @@ static int dentfill(char *path, struct entry **ppdents)
                        if (S_ISDIR(sb.st_mode))
                                dentp->flags |= DIR_OR_LINK_TO_DIR;
 #if !(defined(__sun) || defined(__HAIKU__)) /* no d_type */
-               } else if (dp->d_type == DT_DIR || (dp->d_type == DT_LNK && S_ISDIR(sb.st_mode))) {
+               } else if (dp->d_type == DT_DIR || ((dp->d_type == DT_LNK || dp->d_type == DT_UNKNOWN) && S_ISDIR(sb.st_mode))) {
                        dentp->flags |= DIR_OR_LINK_TO_DIR;
 #endif
                }