Fix #893: show symlink target in statusbar

This commit is contained in:
Arun Prakash Jana 2021-03-18 23:45:32 +05:30
parent 381b251fd0
commit c825a9e541
No known key found for this signature in database
GPG key ID: A75979F35C080412

View file

@ -5683,6 +5683,12 @@ 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))
{
addstr(" [-> ");
addstr(g_buf);
addch(']');
}
addch('\n'); addch('\n');
} }