1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/runconfig
Yong Tang 800a7d513d Fix one-character directory issue in the volume option (#20122).
The issue comes from the implementation of volumeSplitN() where a
driver letter (`[a-zA-Z]:`) was assumed to follow either `:`, `/`,
or `\\`.

In Windows driver letter appears in two situations:
a. `^[a-zA-Z]:` (A colon followed  by `^[a-zA-Z]:` is OK as colon is
the separator in volume option)
b. A string in the format like `\\?\C:\Windows\...` (UNC).
Therefore, a driver letter can only follow either a `:` or `\\`

This PR removes the condition of `/` before the driver letter so
that options like `-v /tmp/q:/foo` could be handled correctly. A
couple of tests has also been added.

This PR fixes #20122.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-03-21 02:55:06 +00:00
..
fixtures Move the runconfig.Parse() function into the runconfig/opts package. 2016-01-04 12:06:29 -05:00
opts Fix one-character directory issue in the volume option (#20122). 2016-03-21 02:55:06 +00:00
compare.go Vendor engine-api to 70d266e96080e3c3d63c55a4d8659e00ac1f7e6c 2016-02-29 19:28:37 +08:00
compare_test.go Vendor engine-api to 70d266e96080e3c3d63c55a4d8659e00ac1f7e6c 2016-02-29 19:28:37 +08:00
config.go Windows: Fix 'isolation' 2016-02-10 13:19:19 -08:00
config_test.go Vendor engine-api to 70d266e96080e3c3d63c55a4d8659e00ac1f7e6c 2016-02-29 19:28:37 +08:00
config_unix.go fix some typos. 2016-03-10 10:09:27 +08:00
config_windows.go fix some typos. 2016-03-10 10:09:27 +08:00
errors.go Allow --hostname with --net=host 2016-03-09 20:40:12 -05:00
hostconfig.go Modify import paths to point to the new engine-api package. 2016-01-06 19:48:59 -05:00
hostconfig_test.go Run privileged containers when userns are specified 2016-03-14 17:09:25 +02:00
hostconfig_unix.go Allow --hostname with --net=host 2016-03-09 20:40:12 -05:00
hostconfig_windows.go Windows libnetwork integration 2016-03-09 20:33:21 -08:00
streams.go Replace execdrivers with containerd implementation 2016-03-18 13:38:32 -07:00