src/nnn.c | 4 ++-- diff --git a/src/nnn.c b/src/nnn.c index 33ac941c7849c89a66a5c44ec7b2c24ae2e6ed2e..1326d3b2503f2c7b4ba57995671b835633ae6fa4 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -3765,10 +3765,9 @@ if (!dp) goto exit; #ifdef __sun - if (cfg.blkorder) { /* no d_type */ + flags = AT_SYMLINK_NOFOLLOW; /* no d_type */ #else if (cfg.blkorder || dp->d_type == DT_UNKNOWN) { -#endif /* * Optimization added for filesystems which support dirent.d_type * see readdir(3) @@ -3778,6 +3777,7 @@ * - the modification time of the symlink is set to that of the target file */ flags = AT_SYMLINK_NOFOLLOW; } +#endif do { namep = dp->d_name;