]> Sergey Matveev's repositories - nnn.git/commitdiff
Show target file size in list mode
authorArun Prakash Jana <engineerarun@gmail.com>
Sat, 8 Feb 2020 12:15:49 +0000 (17:45 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Sat, 8 Feb 2020 12:15:49 +0000 (17:45 +0530)
src/nnn.c

index 8c7cfc32b65a5130f45323d37dfd8f19d6b7fbd6..71b5fc27a454dddebd43c2d2c21336889446ec53 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -4369,7 +4369,7 @@ static int dentfill(char *path, struct entry **dents)
                if (!flags && dp->d_type == DT_LNK) {
                         /* Do not add sizes for links */
                        dentp->mode = (sb.st_mode & ~S_IFMT) | S_IFLNK;
-                       dentp->size = 0;
+                       dentp->size = g_listpath ? sb.st_size : 0;
                } else {
                        dentp->mode = sb.st_mode;
                        dentp->size = sb.st_size;