Closed McTrk closed 3 years ago
Hi @McTrk,
thanks for reporting this! The problem is caused by the canonicalization of path names, which normalized backslashes to regular, forward slashes in input path names. Also when unpacking SquashFS images, filenames are sanity checked and rejected if they contain slashes or other OS specific problematic names.
I added a fix in commit 0e3bb2104a8e3fd07e201e6ba99f8d017fdc72a8 which removes the normalization and modifies the unpacking sanity check to only reject backslashes on Windows.
With the fix applied, your example case appears to work on my end now at least.
Reproduce as follows:
gensquashfs -q -o -D /usr/lib/systemd/system/ /tmp/test.squashfs
Verify that the problematic file exists:ls -l /usr/lib/systemd/system/system-systemd\\x2dcryptsetup.slice
Verify problematic character:
echo $'\x2d'
Screenshot:![Screenshot from 2020-12-27 18-36-17](https://user-images.githubusercontent.com/168069/103181830-913c0200-4873-11eb-8a21-dea26f98914c.png)