diff options
author | John Howard <jhoward@microsoft.com> | 2016-04-26 19:26:12 -0700 |
---|---|---|
committer | John Howard <jhoward@microsoft.com> | 2016-05-06 16:08:53 -0700 |
commit | 7f66598583fef21717016610a5708a2ce4bd57fb (patch) | |
tree | ad4d6b1e08eb8818a825ec9c03e19a32ec3255a8 /daemon/archive.go | |
parent | 2b97201e0cd8301484fde379d2bf7f0ad3f36f10 (diff) | |
download | docker-7f66598583fef21717016610a5708a2ce4bd57fb.tar.gz |
Windows: docker cp consistent paths
Signed-off-by: John Howard <jhoward@microsoft.com>
Diffstat (limited to 'daemon/archive.go')
-rw-r--r-- | daemon/archive.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/daemon/archive.go b/daemon/archive.go index 5cf6985210..b2221560a3 100644 --- a/daemon/archive.go +++ b/daemon/archive.go @@ -13,6 +13,7 @@ import ( "github.com/docker/docker/pkg/chrootarchive" "github.com/docker/docker/pkg/idtools" "github.com/docker/docker/pkg/ioutils" + "github.com/docker/docker/pkg/system" "github.com/docker/engine-api/types" ) @@ -188,6 +189,12 @@ func (daemon *Daemon) containerExtractToDir(container *container.Container, path return err } + // Check if a drive letter supplied, it must be the system drive. No-op except on Windows + path, err = system.CheckSystemDriveAndRemoveDriveLetter(path) + if err != nil { + return err + } + // The destination path needs to be resolved to a host path, with all // symbolic links followed in the scope of the container's rootfs. Note // that we do not use `container.ResolvePath(path)` here because we need |