mirror of
https://github.com/clearlinux/docker.git
synced 2026-08-22 05:56:17 +00:00
replace == by HasPrefix for names and improve error message
This commit is contained in:
@@ -1088,6 +1088,9 @@ func postContainerLink(srv *Server, version float64, w http.ResponseWriter, r *h
|
||||
}
|
||||
|
||||
if err := srv.runtime.RenameLink(currentName, newName); err != nil {
|
||||
if strings.HasSuffix(err.Error(), "name are not unique") {
|
||||
return fmt.Errorf("Conflict, %s already exists", newName)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user