sylabs / oci-tools

Go module for working with OCI container images.
Apache License 2.0
2 stars 3 forks source link

fix: trailing slash for dir entries #43

Closed tri-adam closed 6 months ago

tri-adam commented 6 months ago

Previously, we were cleaning the name from the input TAR header, and writing that out. For example, if a TAR entry for "./" was read, it would be written as ".". Unfortunately, a "." TAR entry causes sqfstar to fail when it is used as the converter for SquashfsLayer.

Fix this by always adding a trailing slash to directory entries, which is the norm for TAR streams. Add test image that stimulates the issue, and update golden files as appropriate.