Allow saving duplicate blobs in the repacker

This adds code to the master index to allow saving duplicate blobs
within the repacker. In this mode, only the list of currently in flight
blobs is consulted, and not the index. This correct because while
repacking, a unique list of blobs is saved again to the index.
This commit is contained in:
Alexander Neumann
2016-01-17 21:14:55 +01:00
parent 34c1056efc
commit f53008d916
4 changed files with 47 additions and 40 deletions

View File

@@ -136,7 +136,7 @@ func repackBlob(src, dst *repository.Repository, id backend.ID) error {
return errors.New("LoadBlob returned wrong data, len() doesn't match")
}
_, err = dst.SaveAndEncrypt(blob.Type, buf, &id)
_, err = dst.SaveAndEncrypt(blob.Type, buf, &id, true)
if err != nil {
return err
}