Explorar o código

Fixed a bug which caused 'docker cp' to fail when the destination name already exists.

Solomon Hykes %!s(int64=12) %!d(string=hai) anos
pai
achega
49da84d7c4
Modificáronse 1 ficheiros con 0 adicións e 3 borrados
  1. 0 3
      image/image.go

+ 0 - 3
image/image.go

@@ -141,9 +141,6 @@ func (index *Index) Copy(srcNameOrId, dstName string) (*Image, error) {
 	if src == nil {
 		return nil, errors.New("No such image: " + srcNameOrId)
 	}
-	if index.Find(dstName) != nil {
-		return nil, errors.New(dstName + ": image already exists.")
-	}
 	dst, err := NewImage(dstName, src.Layers, src.Id)
 	if err != nil {
 		return nil, err