nnn

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 71083b0670d62a05e86c9355fb78945b84f595f5
parent c625679d586a7ca7da56068889a9b99b59c0c314
Author: Arun Prakash Jana <engineerarun@gmail.com>
Date:   Sun, 21 Mar 2021 06:25:17 +0530

Show correct symlink size in sttausbar

Diffstat:
Msrc/nnn.c | 11++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/nnn.c b/src/nnn.c @@ -5684,17 +5684,22 @@ static void statusbar(char *path) addch(' '); } #endif - addstr(coolsize(pent->size)); - addch(' '); - addstr(ptr); if (S_ISLNK(pent->mode)) { i = readlink(pent->name, g_buf, PATH_MAX); + + if (i > 0) + addstr(coolsize(i)); + if (i > 1) { g_buf[i] = '\0'; addstr(" ->"); addstr(g_buf); } + } else { + addstr(coolsize(pent->size)); + addch(' '); + addstr(ptr); } addch('\n'); }