You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
uses filepath.Clean, which on Windows replaces all "/" with "\\". This is incorrect for tarball archives. Such archives cannot then be used or imported.
To Reproduce
Simply execute: crane.exe export docker:dind docker-dind.tar
and then try to open this archive under Linux, you will see the following:
Expected behavior
A correctly formed tarball archive.
Additional context
Output of crane version: 0.19.2 but it is relevant for any version.
Adding the following three lines of code after the line at
// Some tools prepend everything with "./", so if we don't Clean the
// name, we may have duplicate entries, which angers tar-split.
header.Name = filepath.Clean(header.Name)
// + this >>>
if runtime.GOOS == "windows" {
header.Name = strings.ReplaceAll(header.Name, "\\", "/")
}
The text was updated successfully, but these errors were encountered:
This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Keep fresh with the 'lifecycle/frozen' label.
Describe the bug
In Windows versions, the tarball archive is not exported correctly. During the export, the file at:
go-containerregistry/pkg/v1/mutate/mutate.go
Line 297 in 1b4e407
To Reproduce
Simply execute:
crane.exe export docker:dind docker-dind.tar
and then try to open this archive under Linux, you will see the following:
Expected behavior
A correctly formed tarball archive.
Additional context
crane version
: 0.19.2 but it is relevant for any version.Adding the following three lines of code after the line at
go-containerregistry/pkg/v1/mutate/mutate.go
Line 297 in 1b4e407
solves the problem:
The text was updated successfully, but these errors were encountered: