Browse code

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

Solomon Hykes authored on 2013/01/29 16:17:47
Showing 1 changed files
... ...
@@ -141,9 +141,6 @@ func (index *Index) Copy(srcNameOrId, dstName string) (*Image, error) {
141 141
 	if src == nil {
142 142
 		return nil, errors.New("No such image: " + srcNameOrId)
143 143
 	}
144
-	if index.Find(dstName) != nil {
145
-		return nil, errors.New(dstName + ": image already exists.")
146
-	}
147 144
 	dst, err := NewImage(dstName, src.Layers, src.Id)
148 145
 	if err != nil {
149 146
 		return nil, err