moby--moby/daemon/graphdriver
John Howard 2c8522b0a3 LCOW:Enable image push when files have spaces
Signed-off-by: John Howard <jhoward@microsoft.com>

Reported internally at Microsoft through VSO#19696554.
Using the solution from https://groups.google.com/forum/#!topic/Golang-Nuts/DpldsmrhPio
to quote file name and escape single quotes (https://play.golang.org/p/ntk8EEGjfk)

Simple repro steps are something like:

On an ubuntu box run something like
```
docker run -d --rm -p 5000:5000 registry:latest
hostname-I to get the ip address
```

On Windows start the daemon adding `--insecure-registry 10.124.186.18:5000`
(or whatever the IP address from above was)

```
docker run -it alpine sh
/ # echo bar > "with space"​
/ # echo foo > 'single quote space'
/ # exit

docker ps -a
docker commit <containerid>
(note the first few of the image id)
docker tag <first few> 10.124.186.18:5000/test
docker push 10.124.186.18:5000/test
```

Resulting error when pushing the image:

```
PS E:\docker\build\19696554> docker push 10.124.186.18:5000/simpletest2
The push refers to repository [10.124.186.18:5000/simpletest2]​
d328d7f5f277: Pushing [==================================================>]  74.24kB/74.24kB​
503e53e365f3: Layer already exists​
svm.runProcess: command cat /tmp/d59/single quote space failed with exit code 1​
PS E:\docker\build\19696554>
```

After this change pushing the image:
```
PS E:\docker\build\19696554> docker push 10.124.186.18:5000/simpletest2
The push refers to repository [10.124.186.18:5000/simpletest2]
d328d7f5f277: Pushing [==================================================>]  74.24kB/74.24kB
503e53e365f3: Layer already exists
latest: digest: sha256:b9828a2d2a3d2421a4c342f48b7936714b3d8409dc32c103da5f3fb13b54bdbf size: 735
PS E:\docker\build\19696554>
```
2019-02-04 12:07:58 -08:00
..
aufs aufs: get rid of mount() 2018-12-10 20:06:10 -08:00
btrfs pkg/mount: wrap mount/umount errors 2018-12-10 20:07:02 -08:00
copy Update tests to use gotest.tools 👼 2018-06-13 09:04:30 +02:00
devmapper pkg/mount: wrap mount/umount errors 2018-12-10 20:07:02 -08:00
graphtest
lcow LCOW:Enable image push when files have spaces 2019-02-04 12:07:58 -08:00
overlay
overlay2
overlayutils
quota
register
vfs
windows
zfs pkg/mount: wrap mount/umount errors 2018-12-10 20:07:02 -08:00
counter.go
driver.go
driver_freebsd.go
driver_linux.go
driver_test.go
driver_unsupported.go
driver_windows.go
errors.go
fsdiff.go
plugin.go
proxy.go