mirror of
https://github.com/docker/cli.git
synced 2026-09-24 07:25:07 -05:00
Merge pull request #9705 from acbodine/9311-truncindex-error-duplicate-id-on-ambiguous-id
Closes #9311 Handles container id/name collisions against daemon functionalities according to #8069 Upstream-commit: 34c804a139cc086e9fa6d3f99442f083b6d5e1e7 Component: engine
This commit is contained in:
@@ -1114,7 +1114,7 @@ func postContainersCopy(eng *engine.Engine, version version.Version, w http.Resp
|
||||
w.Header().Set("Content-Type", "application/x-tar")
|
||||
if err := job.Run(); err != nil {
|
||||
log.Errorf("%s", err.Error())
|
||||
if strings.Contains(strings.ToLower(err.Error()), "no such container") {
|
||||
if strings.Contains(strings.ToLower(err.Error()), "no such id") {
|
||||
w.WriteHeader(http.StatusNotFound)
|
||||
} else if strings.Contains(err.Error(), "no such file or directory") {
|
||||
return fmt.Errorf("Could not find the file %s in container %s", origResource, vars["name"])
|
||||
|
||||
Reference in New Issue
Block a user