mirror of
https://github.com/distribution/distribution.git
synced 2025-08-19 23:38:13 +00:00
Replaced usage of storagedriver.Walk with storagedriver.WalkFiles for linked/blobstore
This commit is contained in:
parent
f31195b2e8
commit
c83e9ae10a
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user