squashfs-tools icon indicating copy to clipboard operation
squashfs-tools copied to clipboard

Feature request: Allow mksquashfs to follow symlinks instead of creating a symlink

Open m94mni opened this issue 1 year ago • 0 comments

Newer versions of GNU tar has an option for dereferencing symlinks, --dereference

https://www.gnu.org/software/tar/manual/html_node/dereference.html

I have a use case for this where a file resides in a directory without executable permission, so I can't include it in the squashfs. But I have a symlink to a specific file in that directory, and I want to copy the contents of that link.

From reading the code, it seems like replacing lstat() with (dereference ? stat : lstat)() in a few places would implement this behavior.

m94mni avatar May 31 '23 06:05 m94mni