AgentD / squashfs-tools-ng

A new set of tools and libraries for working with SquashFS images
Other
194 stars 30 forks source link

rdsquashfs: support unpacking single file (other than --cat) #66

Closed slashbeast closed 3 years ago

slashbeast commented 3 years ago

Hi,

It would be great if the rdsquashfs could unpack a single file. Currently you can either use --cat and redirect stdout, or use --unpack-path and unpack whole subdirectory of choice. Would be great if --unpack-path could handle path to single file too.

AgentD commented 3 years ago

Hi!

The --unpack-path option was actually intended to work that way. Unfortunately, due to a bug in how paths are generated for tree nodes, the path for a node with no parent (i.e. root of the sub tree) always ended up as "/", which was then normalized to empty-string. This should now be fixed in current master.

Thanks for reporting.