1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/runconfig/opts
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
envfile.go Move some validators from opts to runconfig/opts. 2016-01-04 14:35:36 -05:00
envfile_test.go Move some validators from opts to runconfig/opts. 2016-01-04 14:35:36 -05:00
opts.go Move some validators from opts to runconfig/opts. 2016-01-04 14:35:36 -05:00
opts_test.go Move some validators from opts to runconfig/opts. 2016-01-04 14:35:36 -05:00
parse.go Fix one-character directory issue in the volume option (#20122). 2016-03-21 02:55:06 +00:00
parse_test.go Fix one-character directory issue in the volume option (#20122). 2016-03-21 02:55:06 +00:00
throttledevice.go Modify import paths to point to the new engine-api package. 2016-01-06 19:48:59 -05:00
ulimit.go Move ulimit options to runconfig opts 2015-12-23 13:27:58 -05:00
ulimit_test.go Move ulimit options to runconfig opts 2015-12-23 13:27:58 -05:00
weightdevice.go Modify import paths to point to the new engine-api package. 2016-01-06 19:48:59 -05:00