Merge pull request #12222 from chenhanxiao/cp-support-colon

cp: add support for copy filename with ":"
This commit is contained in:
Michael Crosby
2015-04-13 13:09:12 -07:00
2 changed files with 34 additions and 1 deletions
+2 -1
View File
@@ -21,7 +21,8 @@ func (cli *DockerCli) CmdCp(args ...string) error {
cmd.ParseFlags(args, true)
info := strings.Split(cmd.Arg(0), ":")
// deal with path name with `:`
info := strings.SplitN(cmd.Arg(0), ":", 2)
if len(info) != 2 {
return fmt.Errorf("Error: Path not specified")