]> Sergey Matveev's repositories - nnn.git/commitdiff
Show dir symbol in symlink file stat
authorArun Prakash Jana <engineerarun@gmail.com>
Fri, 17 Aug 2018 00:25:00 +0000 (05:55 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Fri, 17 Aug 2018 00:25:00 +0000 (05:55 +0530)
nnn.c

diff --git a/nnn.c b/nnn.c
index 3e13835b72b3e6687912e0b00135c16ff2273670..b7a970c992564f45522e84a7ea543521bfbddbe6 100644 (file)
--- a/nnn.c
+++ b/nnn.c
@@ -1760,6 +1760,10 @@ show_stats(char *fpath, char *fname, struct stat *sb)
                ssize_t len = readlink(fpath, g_buf, MAX_CMD_LEN);
 
                if (len != -1) {
+                       struct stat tgtsb;
+                       if (!stat(fpath, &tgtsb) && S_ISDIR(tgtsb.st_mode))
+                               g_buf[len++] = '/';
+
                        g_buf[len] = '\0';
 
                        /*