mirror of
https://github.com/distribution/distribution.git
synced 2025-08-20 07:45:33 +00:00
storagedriver/s3: fixed a bug in s3 Walk impl preventing ErrSkipDir from stopping gracefully
This commit is contained in:
parent
aea873cc92
commit
847738fd5e
@ -1122,6 +1122,7 @@ func (d *driver) doWalk(parentCtx context.Context, objectCount *int64, path, pre
|
||||
continue
|
||||
}
|
||||
|
||||
// walk over file's parent directory if not a duplicate
|
||||
dir := filepath.Dir(walkInfo.Path())
|
||||
if dir != prevDir {
|
||||
prevDir = dir
|
||||
@ -1149,7 +1150,8 @@ func (d *driver) doWalk(parentCtx context.Context, objectCount *int64, path, pre
|
||||
|
||||
if err != nil {
|
||||
if err == storagedriver.ErrSkipDir {
|
||||
break
|
||||
// stop early without return error
|
||||
return false
|
||||
}
|
||||
retError = err
|
||||
return false
|
||||
|
Loading…
Reference in New Issue
Block a user