mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-08 06:51:40 +00:00
Merge pull request #12222 from chenhanxiao/cp-support-colon
cp: add support for copy filename with ":"
This commit is contained in:
+2
-1
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user