diff options
Diffstat (limited to 'lib/common/src')
-rw-r--r-- | lib/common/src/writer/serialize_fstree.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/common/src/writer/serialize_fstree.c b/lib/common/src/writer/serialize_fstree.c index 7ecd850..b5151f3 100644 --- a/lib/common/src/writer/serialize_fstree.c +++ b/lib/common/src/writer/serialize_fstree.c @@ -35,6 +35,7 @@ static sqfs_inode_generic_t *tree_node_to_inode(tree_node_t *node) inode->data.ipc.nlink = node->link_count; break; case S_IFLNK: + assert(!(node->flags & FLAG_LINK_IS_HARD)); inode->base.type = SQFS_INODE_SLINK; inode->data.slink.nlink = node->link_count; inode->data.slink.target_size = extra; @@ -71,7 +72,7 @@ static sqfs_inode_generic_t *write_dir_entries(const char *filename, goto fail; for (it = node->data.children; it != NULL; it = it->next) { - if (it->mode == FSTREE_MODE_HARD_LINK_RESOLVED) { + if (S_ISLNK(it->mode) && (it->flags & FLAG_LINK_IS_HARD)) { tgt = it->data.target_node; } else { tgt = it; |