Show symlink size on readlink failure

This commit is contained in:
Arun Prakash Jana 2021-03-21 06:53:38 +05:30
parent 71083b0670
commit 49c458517f
No known key found for this signature in database
GPG key ID: A75979F35C080412

View file

@ -5688,8 +5688,7 @@ static void statusbar(char *path)
{ {
i = readlink(pent->name, g_buf, PATH_MAX); i = readlink(pent->name, g_buf, PATH_MAX);
if (i > 0) addstr(coolsize(i >= 0 ? i : pent->size));
addstr(coolsize(i));
if (i > 1) { if (i > 1) {
g_buf[i] = '\0'; g_buf[i] = '\0';