archive: replace tarName() with filepath.ToSlash()
This code was copied from github.com/moby/moby/pkg/archive;28842d3f09
, which got later simplified ina5aed699cf
This patch aligns the containerd implementation with those changes, and uses filepath.ToSlash() unconditionally on all platforms, as it's a no-op on platforms that use a forward-slash; https://github.com/golang/go/blob/go1.19/src/path/filepath/path.go#L175-L183 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -34,10 +34,6 @@ import (
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
func tarName(p string) (string, error) {
|
||||
return p, nil
|
||||
}
|
||||
|
||||
func chmodTarEntry(perm os.FileMode) os.FileMode {
|
||||
return perm
|
||||
}
|
||||
|
Reference in New Issue
Block a user