du: Do not count directories in FS mode (#4369)

This commit is contained in:
Anis Elleuch
2022-11-15 07:54:18 -08:00
committed by GitHub
parent a20ab1b3dc
commit 3ee6095c47
+2 -3
View File
@@ -167,7 +167,6 @@ func du(ctx context.Context, urlStr string, timeRef time.Time, withVersions bool
}
if content.Type.IsDir() && !recursive {
depth := depth
if depth > 0 {
depth--
@@ -184,8 +183,8 @@ func du(ctx context.Context, urlStr string, timeRef time.Time, withVersions bool
size += used
objects += n
} else {
size += content.Size
if !content.IsDeleteMarker {
if !content.IsDeleteMarker && !content.Type.IsDir() {
size += content.Size
objects++
}
}