Windows: Fix long path handling for docker build

Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
This commit is contained in:
Stefan J. Wernli 2015-08-24 14:07:22 -07:00
parent 5bebf3cbac
commit fe637416e9
9 changed files with 214 additions and 10 deletions

View file

@ -4,6 +4,7 @@ import (
"io"
"github.com/docker/docker/pkg/archive"
"github.com/docker/docker/pkg/longpath"
)
// chroot is not supported by Windows
@ -17,5 +18,5 @@ func invokeUnpack(decompressedArchive io.ReadCloser,
// Windows is different to Linux here because Windows does not support
// chroot. Hence there is no point sandboxing a chrooted process to
// do the unpack. We call inline instead within the daemon process.
return archive.Unpack(decompressedArchive, dest, options)
return archive.Unpack(decompressedArchive, longpath.AddPrefix(dest), options)
}