Commit 20af59f 1 parent de79a2e commit 20af59f Copy full SHA for 20af59f
File tree 1 file changed +3
-4
lines changed
1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -485,7 +485,7 @@ func (s *Store) GC(ctx context.Context) error {
485
485
reachableNodes := s .graph .DigestSet ()
486
486
487
487
// clean up garbage blobs in the storage
488
- rootpath := filepath .Join (s .root , "blobs" )
488
+ rootpath := filepath .Join (s .root , ocispec . ImageBlobsDir )
489
489
algDirs , err := os .ReadDir (rootpath )
490
490
if err != nil {
491
491
return err
@@ -510,9 +510,8 @@ func (s *Store) GC(ctx context.Context) error {
510
510
}
511
511
dgst := digestEntry .Name ()
512
512
blobDigest := digest .NewDigestFromEncoded (digest .Algorithm (alg ), dgst )
513
- err := blobDigest .Validate ()
514
- // skip irrelevant content
515
- if err != nil {
513
+ if err := blobDigest .Validate (); err != nil {
514
+ // skip irrelevant content
516
515
continue
517
516
}
518
517
if ! reachableNodes .Contains (blobDigest ) {
You can’t perform that action at this time.
0 commit comments