aboutsummaryrefslogtreecommitdiff
path: root/lib/sqfs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqfs')
-rw-r--r--lib/sqfs/src/io/dir_hl.c1
-rw-r--r--lib/sqfs/src/io/dir_unix.c4
2 files changed, 2 insertions, 3 deletions
diff --git a/lib/sqfs/src/io/dir_hl.c b/lib/sqfs/src/io/dir_hl.c
index 08efaaf..b693a49 100644
--- a/lib/sqfs/src/io/dir_hl.c
+++ b/lib/sqfs/src/io/dir_hl.c
@@ -134,6 +134,7 @@ static int next(sqfs_dir_iterator_t *base, sqfs_dir_entry_t **out)
*out = NULL;
}
} else {
+ (*out)->size = strlen(it->link_target);
(*out)->mode = SQFS_INODE_MODE_LNK | 0777;
(*out)->flags |= SQFS_DIR_ENTRY_FLAG_HARD_LINK;
}
diff --git a/lib/sqfs/src/io/dir_unix.c b/lib/sqfs/src/io/dir_unix.c
index efc9a2a..1cf7beb 100644
--- a/lib/sqfs/src/io/dir_unix.c
+++ b/lib/sqfs/src/io/dir_unix.c
@@ -115,9 +115,7 @@ static int dir_next(sqfs_dir_iterator_t *base, sqfs_dir_entry_t **out)
(*out)->uid = it->sb.st_uid;
(*out)->gid = it->sb.st_gid;
(*out)->inode = it->sb.st_ino;
-
- if (S_ISREG(it->sb.st_mode))
- (*out)->size = it->sb.st_size;
+ (*out)->size = it->sb.st_size;
if ((*out)->dev != it->device)
(*out)->flags |= SQFS_DIR_ENTRY_FLAG_MOUNT_POINT;