diff --git a/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/bootstrap/BootstrapUtils.java b/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/bootstrap/BootstrapUtils.java index c6f0832445e5e..9b0db44ecf45f 100644 --- a/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/bootstrap/BootstrapUtils.java +++ b/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/bootstrap/BootstrapUtils.java @@ -70,7 +70,7 @@ public static List>> getAllLeafFoldersWithFi Integer level = (int) relativePath.chars().filter(ch -> ch == '/').count(); HoodieFileStatus hoodieFileStatus = FileStatusUtils.fromFileStatus(topLevelStatus); result.add(Pair.of(hoodieFileStatus, Pair.of(level, relativePath))); - } else if (metaPathFilter.accept(topLevelStatus.getPath())) { + } else if (topLevelStatus.isDirectory() && metaPathFilter.accept(topLevelStatus.getPath())) { subDirectories.add(topLevelStatus.getPath().toString()); } }