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

Upstream-commit: 49da84d7c4babd597dfbcba168a81a4434c28bf1
Component: engine
This commit is contained in:
Solomon Hykes
2013-01-28 23:17:47 -08:00
parent 5b2d2c5a81
commit b6d8688923
-3
View File
@@ -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