mirror of
https://github.com/containers/podman.git
synced 2025-06-23 18:59:30 +08:00
pkg/bindings/images.nTar(): slashify hdr.Name values
When setting path names in the build context archive, convert path names to use forward slashes, as is normal for those archives, so that directory hierarchies archived on Windows hosts extract correctly everywhere. Not really sure how to run the remote client in CI on a system that uses `\` as a path separator, which is where this error crops up, so [NO TESTS NEEDED] Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
This commit is contained in:
@ -481,9 +481,9 @@ func nTar(excludes []string, sources ...string) (io.ReadCloser, error) {
|
|||||||
return nil // skip root dir
|
return nil // skip root dir
|
||||||
}
|
}
|
||||||
|
|
||||||
name := strings.TrimPrefix(path, s+string(filepath.Separator))
|
name := filepath.ToSlash(strings.TrimPrefix(path, s+string(filepath.Separator)))
|
||||||
|
|
||||||
excluded, err := pm.Matches(filepath.ToSlash(name)) // nolint:staticcheck
|
excluded, err := pm.Matches(name) // nolint:staticcheck
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrapf(err, "error checking if %q is excluded", name)
|
return errors.Wrapf(err, "error checking if %q is excluded", name)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user