mirror of
https://github.com/distribution/distribution.git
synced 2025-08-31 14:37:56 +00:00
storagedriver/s3: Simplified conditional in Walk impl
This commit is contained in:
@@ -1210,12 +1210,10 @@ func (d *driver) doWalk(parentCtx context.Context, objectCount *int64, path, pre
|
||||
return false
|
||||
}
|
||||
|
||||
if walkDirectories {
|
||||
if walkInfo.IsDir() {
|
||||
if err := d.doWalk(ctx, objectCount, *walkInfo.prefix, prefix, walkDirectories, f); err != nil {
|
||||
retError = err
|
||||
return false
|
||||
}
|
||||
if walkInfo.IsDir() && walkDirectories {
|
||||
if err := d.doWalk(ctx, objectCount, *walkInfo.prefix, prefix, walkDirectories, f); err != nil {
|
||||
retError = err
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user