Skip to content

Commit 6358c20

Browse files
committed
Deleting empty folders upon src extraction
1 parent fc4b237 commit 6358c20

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/org/mcphackers/mcp/tools/FileUtil.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ public static void copyResource(InputStream is, Path out) throws IOException {
234234
}
235235

236236
public static void deleteEmptyFolders(Path path) throws IOException {
237+
//TODO Check if each folder only contains folders instead of letting File::delete to decide
237238
try (Stream<Path> pathStream = Files.walk(path)) {
238239
pathStream.sorted(Comparator.reverseOrder())
239240
.map(Path::toFile)
@@ -257,6 +258,6 @@ public static void deletePackages(Path sourceFolder, String[] excludedFolders) t
257258
}
258259
});
259260
}
260-
//deleteEmptyFolders(sourceFolder);
261+
deleteEmptyFolders(sourceFolder);
261262
}
262263
}

0 commit comments

Comments
 (0)