aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--nnn.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/nnn.c b/nnn.c
index 3e13835..b7a970c 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';
/*