mirror of
https://github.com/clearlinux/docker.git
synced 2026-08-25 08:36:01 +00:00
replace == by HasPrefix for names and improve error message
This commit is contained in:
+1
-1
@@ -518,7 +518,7 @@ func (runtime *Runtime) RenameLink(oldName, newName string) error {
|
||||
|
||||
// This is not rename but adding a new link for the default name
|
||||
// Strip the leading '/'
|
||||
if entity.ID() == oldName[1:] {
|
||||
if strings.HasPrefix(entity.ID(), oldName[1:]) {
|
||||
_, err := runtime.containerGraph.Set(newName, entity.ID())
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user