mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-05 21:21:42 +00:00
pkg/archive_windows: make use of os.PathSeparator
cc: @jhowardmsft Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
This commit is contained in:
@@ -4,6 +4,7 @@ package archive
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar"
|
||||
@@ -20,7 +21,8 @@ func CanonicalTarNameForPath(p string) (string, error) {
|
||||
if strings.Contains(p, "/") {
|
||||
return "", fmt.Errorf("windows path contains forward slash: %s", p)
|
||||
}
|
||||
return strings.Replace(p, "\\", "/", -1), nil
|
||||
return strings.Replace(p, string(os.PathSeparator), "/", -1), nil
|
||||
|
||||
}
|
||||
|
||||
func setHeaderForSpecialDevice(hdr *tar.Header, ta *tarAppender, name string, stat interface{}) (nlink uint32, inode uint64, err error) {
|
||||
|
||||
Reference in New Issue
Block a user