From 994ee0d790b57c898c788025dbdd9f578d5b89f4 Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Fri, 17 Aug 2018 05:55:00 +0530 Subject: [PATCH] Show dir symbol in symlink file stat --- nnn.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nnn.c b/nnn.c index 3e13835b..b7a970c9 100644 --- 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'; /*