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