Replaced usage of storagedriver.Walk with storagedriver.WalkFiles for linked/blobstore

This commit is contained in:
Collin Shoop 2021-06-24 14:48:20 -04:00
parent f31195b2e8
commit c83e9ae10a
2 changed files with 2 additions and 11 deletions

View File

@ -93,12 +93,7 @@ func (bs *blobStore) Enumerate(ctx context.Context, ingester func(dgst digest.Di
return err
}
return bs.driver.Walk(ctx, specPath, func(fileInfo driver.FileInfo) error {
// skip directories
if fileInfo.IsDir() {
return nil
}
return bs.driver.WalkFiles(ctx, specPath, func(fileInfo driver.FileInfo) error {
currentPath := fileInfo.Path()
// we only want to parse paths that end with /data
_, fileName := path.Split(currentPath)

View File

@ -247,11 +247,7 @@ func (lbs *linkedBlobStore) Enumerate(ctx context.Context, ingestor func(digest.
if err != nil {
return err
}
return lbs.driver.Walk(ctx, rootPath, func(fileInfo driver.FileInfo) error {
// exit early if directory...
if fileInfo.IsDir() {
return nil
}
return lbs.driver.WalkFiles(ctx, rootPath, func(fileInfo driver.FileInfo) error {
filePath := fileInfo.Path()
// check if it's a link