mirror of
https://github.com/project-zot/zot.git
synced 2026-06-18 13:37:57 +08:00
fix(storage): clean up boltdb delete flow
This commit is contained in:
committed by
GitHub
parent
40512e4a41
commit
2b5fa43b79
Vendored
+2
-4
@@ -389,17 +389,15 @@ func (d *BoltDBDriver) DeleteBlob(digest godigest.Digest, path string) error {
|
||||
k := d.getOne(origin)
|
||||
if k == nil {
|
||||
d.log.Debug().Str("digest", digest.String()).Str("path", path).Msg("deleting empty bucket")
|
||||
if err := root.DeleteBucket([]byte(digest)); err != nil {
|
||||
if err := root.DeleteBucket([]byte(digest.String())); err != nil {
|
||||
d.log.Error().Err(err).Str("digest", digest.String()).Str("bucket", digest.String()).Str("path", path).
|
||||
Msg("failed to delete")
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
return zerr.ErrCacheMiss
|
||||
return nil
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user