Windows - make docker cp functional
Signed-off-by: John Howard <jhoward@microsoft.com> Conflicts: pkg/archive/copy.go Make it compile Signed-off-by: John Howard <jhoward@microsoft.com>
This commit is contained in:
parent
003529d8c0
commit
f5727e08d4
4 changed files with 55 additions and 19 deletions
|
@ -14,13 +14,14 @@ import (
|
|||
"strings"
|
||||
)
|
||||
|
||||
// FollowSymlinkInScope is a wrapper around evalSymlinksInScope that returns an absolute path
|
||||
// FollowSymlinkInScope is a wrapper around evalSymlinksInScope that returns an
|
||||
// absolute path. This function handles paths in a platform-agnostic manner.
|
||||
func FollowSymlinkInScope(path, root string) (string, error) {
|
||||
path, err := filepath.Abs(path)
|
||||
path, err := filepath.Abs(filepath.FromSlash(path))
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
root, err = filepath.Abs(root)
|
||||
root, err = filepath.Abs(filepath.FromSlash(root))
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue