Skip to content

Commit

Permalink
minor refinement
Browse files Browse the repository at this point in the history
Signed-off-by: Xiaoxuan Wang <[email protected]>
  • Loading branch information
wangxiaoxuan273 committed Oct 16, 2023
1 parent 645c47a commit 2705375
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions content/oci/deletableoci.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func NewDeletableStoreWithContext(ctx context.Context, root string) (*DeletableS
if err != nil {
return nil, fmt.Errorf("failed to create storage: %w", err)
}
store := &DeletableStore{
ds := &DeletableStore{
AutoSaveIndex: true,
root: rootAbs,
indexPath: filepath.Join(rootAbs, ocispec.ImageIndexFile),
Expand All @@ -84,13 +84,13 @@ func NewDeletableStoreWithContext(ctx context.Context, root string) (*DeletableS
if err := ensureDir(filepath.Join(rootAbs, ocispec.ImageBlobsDir)); err != nil {
return nil, err
}
if err := store.ensureOCILayoutFile(); err != nil {
if err := ds.ensureOCILayoutFile(); err != nil {
return nil, fmt.Errorf("invalid OCI Image Layout: %w", err)
}
if err := store.loadIndexFile(ctx); err != nil {
if err := ds.loadIndexFile(ctx); err != nil {
return nil, fmt.Errorf("invalid OCI Image Index: %w", err)
}
return store, nil
return ds, nil
}

// Fetch fetches the content identified by the descriptor.
Expand Down

0 comments on commit 2705375

Please sign in to comment.