diff --git a/archive/copy.go b/archive/copy.go index a7ed12c..ecfd0a9 100644 --- a/archive/copy.go +++ b/archive/copy.go @@ -10,6 +10,7 @@ import ( "strings" "github.com/Sirupsen/logrus" + "github.com/docker/docker/pkg/system" ) // Errors used or returned by this file. @@ -210,7 +211,7 @@ func CopyInfoDestinationPath(path string) (info CopyInfo, err error) { return CopyInfo{}, err } - if !filepath.IsAbs(linkTarget) { + if !system.IsAbs(linkTarget) { // Join with the parent directory. dstParent, _ := SplitPathDirEntry(path) linkTarget = filepath.Join(dstParent, linkTarget) diff --git a/symlink/fs.go b/symlink/fs.go index ef12f06..d305500 100644 --- a/symlink/fs.go +++ b/symlink/fs.go @@ -12,6 +12,8 @@ import ( "os" "path/filepath" "strings" + + "github.com/docker/docker/pkg/system" ) // FollowSymlinkInScope is a wrapper around evalSymlinksInScope that returns an @@ -120,7 +122,7 @@ func evalSymlinksInScope(path, root string) (string, error) { if err != nil { return "", err } - if filepath.IsAbs(dest) { + if system.IsAbs(dest) { b.Reset() } path = dest + string(filepath.Separator) + path