squashfs
squashfs copied to clipboard
Wrong path separator used while reading the squashfs?
Hi there,
Thanks for your nifty library and it's been a real help for me.
But I've got something wrong when reading the squashfs on Windows hosts.
After some investigation, it seems line 55 here
https://github.com/CalebQ42/squashfs/blob/54d193a3df985eb6fb4826b1689d4495887946eb/reader_fs.go#L43-L60
shall be altered to
split := strings.Split(name, string(os.PathSeparator))
When running on Windows, a path separator
will be modified to \
after filepath.Clean
even if it was passed with /
So I think it's better to split its path by os specified separator rather than hardcoding /
What do you think?
BRs.