mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 05:41:31 +00:00
Show correct symlink size in sttausbar
This commit is contained in:
parent
c625679d58
commit
71083b0670
11
src/nnn.c
11
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');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue