aboutsummaryrefslogtreecommitdiffstats
path: root/nnn.c
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2018-01-04 18:10:59 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2018-01-06 03:46:44 +0530
commitfd11b53b4eafecc6907ee54af037e36988cfe6ac (patch)
tree8ba5fa1455a849f79ecea08a6e0f66078e91f209 /nnn.c
parent00533546d45b973d466a344ad3ecc353fdf29ba0 (diff)
downloadnnn-fd11b53b4eafecc6907ee54af037e36988cfe6ac.tar.gz
Show target for symlinks
Diffstat (limited to 'nnn.c')
-rw-r--r--nnn.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/nnn.c b/nnn.c
index 44e93b5..1206f64 100644
--- a/nnn.c
+++ b/nnn.c
@@ -1535,6 +1535,8 @@ show_stats(char *fpath, char *fname, struct stat *sb)
if (fd == -1)
return -1;
+ dprintf(fd, " File: '%s'", unescape(fname, 0));
+
/* Show file name or 'symlink' -> 'target' */
if (perms[0] == 'l') {
/* Note that MAX_CMD_LEN > PATH_MAX */
@@ -1542,16 +1544,14 @@ show_stats(char *fpath, char *fname, struct stat *sb)
if (len != -1) {
g_buf[len] = '\0';
- dprintf(fd, " File: '%s' -> ", unescape(fname, 0));
/*
* We pass g_buf but unescape() operates on g_buf too!
* Read the API notes for information on how this works.
*/
- dprintf(fd, "'%s'", unescape(g_buf, 0));
+ dprintf(fd, " -> '%s'", unescape(g_buf, 0));
}
- } else
- dprintf(fd, " File: '%s'", unescape(fname, 0));
+ }
/* Show size, blocks, file type */
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__)