moby--moby/integration
Sebastiaan van Stijn 5858a99267
Builder: fix "COPY --from" to non-existing directory on Windows
This fixes a regression introduced in 6d87f19142,
causing `COPY --from` to fail if the target directory does not exist:

```
FROM mcr.microsoft.com/windows/servercore:ltsc2019 as s1
RUN echo "Hello World" > /hello

FROM mcr.microsoft.com/windows/servercore:ltsc2019
COPY --from=s1 /hello /hello/another/world
```

Would produce an error:

```
Step 4/4 : COPY --from=s1 /hello /hello/another/world
failed to copy files: mkdir \\?: The filename, directory name, or volume label syntax is incorrect.
```

The cause for this was that Go's `os.MkdirAll()` does not support/detect volume GUID paths
(`\\?\Volume{dae8d3ac-b9a1-11e9-88eb-e8554b2ba1db}\hello\another}`), and as a result
attempted to create the volume as a directory (`\\?`), causing it to fail.

This patch replaces `os.MkdirAll()` with our own `system.MkdirAll()` function, which
is capable of detecting GUID volumes.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-08 16:45:10 +02:00
..
build Builder: fix "COPY --from" to non-existing directory on Windows 2019-08-08 16:45:10 +02:00
config Add test for keeping same daemon ID on upgrade 2019-06-18 01:40:25 +00:00
container Skip TestHealthKillContainer on Windows 2019-07-19 16:09:50 +02:00
image Add extra permission check in removal test 2019-07-22 20:39:22 +00:00
internal Merge pull request #39240 from olljanat/enable-new-integration-tests-for-win 2019-06-11 14:24:03 -07:00
network Merge pull request #39431 from thaJeztah/macvlan_redundant_checks 2019-07-15 11:33:15 +02:00
plugin Improvements to the test runners 2019-07-31 16:37:17 -07:00
secret Fatalf -> Fatal 2019-01-27 00:43:24 +00:00
service Merge pull request #38441 from sirlatrom/swarm_plugin_env 2019-07-08 15:26:55 -04:00
session integration: run build session tests on non-experimental 2019-07-17 23:56:04 +02:00
system Revert "Remove Schema1 integration test suite" 2019-06-18 00:23:04 +00:00
testdata/https integration/plugin/authz: port tests from integration-cli 2017-10-02 14:20:59 +01:00
volume Merge pull request #39240 from olljanat/enable-new-integration-tests-for-win 2019-06-11 14:24:03 -07:00
doc.go Add canonical import comment 2018-02-05 16:51:57 -05:00