mirror of
https://github.com/distribution/distribution.git
synced 2025-08-21 16:24:00 +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 err
|
||||||
}
|
}
|
||||||
|
|
||||||
return bs.driver.Walk(ctx, specPath, func(fileInfo driver.FileInfo) error {
|
return bs.driver.WalkFiles(ctx, specPath, func(fileInfo driver.FileInfo) error {
|
||||||
// skip directories
|
|
||||||
if fileInfo.IsDir() {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
currentPath := fileInfo.Path()
|
currentPath := fileInfo.Path()
|
||||||
// we only want to parse paths that end with /data
|
// we only want to parse paths that end with /data
|
||||||
_, fileName := path.Split(currentPath)
|
_, fileName := path.Split(currentPath)
|
||||||
|
@ -247,11 +247,7 @@ func (lbs *linkedBlobStore) Enumerate(ctx context.Context, ingestor func(digest.
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
return lbs.driver.Walk(ctx, rootPath, func(fileInfo driver.FileInfo) error {
|
return lbs.driver.WalkFiles(ctx, rootPath, func(fileInfo driver.FileInfo) error {
|
||||||
// exit early if directory...
|
|
||||||
if fileInfo.IsDir() {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
filePath := fileInfo.Path()
|
filePath := fileInfo.Path()
|
||||||
|
|
||||||
// check if it's a link
|
// check if it's a link
|
||||||
|
Loading…
Reference in New Issue
Block a user