Show dir symbol in symlink file stat

This commit is contained in:
Arun Prakash Jana 2018-08-17 05:55:00 +05:30
parent 8b8e644cf5
commit 994ee0d790
No known key found for this signature in database
GPG Key ID: A75979F35C080412
1 changed files with 4 additions and 0 deletions

4
nnn.c
View File

@ -1760,6 +1760,10 @@ show_stats(char *fpath, char *fname, struct stat *sb)
ssize_t len = readlink(fpath, g_buf, MAX_CMD_LEN);
if (len != -1) {
struct stat tgtsb;
if (!stat(fpath, &tgtsb) && S_ISDIR(tgtsb.st_mode))
g_buf[len++] = '/';
g_buf[len] = '\0';
/*