mirror of
https://github.com/jarun/nnn.git
synced 2024-12-01 02:49:44 +00:00
Fix garbled symlink target
This commit is contained in:
parent
5f0b3b74d0
commit
4c8e2e25b8
12
src/nnn.c
12
src/nnn.c
|
@ -5687,11 +5687,15 @@ static void statusbar(char *path)
|
|||
addstr(coolsize(pent->size));
|
||||
addch(' ');
|
||||
addstr(ptr);
|
||||
if (S_ISLNK(pent->mode) && (readlink(pent->name, g_buf, PATH_MAX) > 0))
|
||||
if (S_ISLNK(pent->mode))
|
||||
{
|
||||
addstr(" [-> ");
|
||||
addstr(g_buf);
|
||||
addch(']');
|
||||
i = readlink(pent->name, g_buf, PATH_MAX);
|
||||
if (i > 1) {
|
||||
g_buf[i] = '\0';
|
||||
addstr(" [-> ");
|
||||
addstr(g_buf);
|
||||
addch(']');
|
||||
}
|
||||
}
|
||||
addch('\n');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue