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