summaryrefslogtreecommitdiff
path: root/tests/corpus/cantrbry.tar.xz
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-08-26 10:43:31 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-08-26 10:55:21 +0200
commitce8d6217fe7ed4d40af23242be4eaef8e53385a3 (patch)
tree4c67811a2524cbf0e9f4dd3cf0d0c586ab00d019 /tests/corpus/cantrbry.tar.xz
parentb7052efb163e90c40be9f2886ab1e207048bc70d (diff)
Fix tree node path generation for detached sub trees
The function sqfs_tree_node_get_path is used in several places within rdsquashfs to produce a path for a tree node, either when describing the file system, or when unpacking it. Unpacking can be done on sub-trees as well as the entire tree, in which case the root of the sub-tree has its parent pointer removed, so the full path terminates at the new root. This works with directories, since they receive special case handling anyway, but fails if the sub-tree to unpack is only a single file because the sqfs_tree_node_get_path function assumes that we are at the tree root and returns "/" as a path, which gets normalized to "". This commit adds a workaround to the function to simply use the nodes name (if available) in that case instead. The describe case in rdsquashfs is unaffacted, since it always starts at the root. Likewise, the sqfs2tar case should also be unaffacted, since it already employs special case handling for the [sub] tree root node. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'tests/corpus/cantrbry.tar.xz')
0 files changed, 0 insertions, 0 deletions