Skip to content

Commit

Permalink
recursively delete game directory
Browse files Browse the repository at this point in the history
  • Loading branch information
shartte committed Jan 1, 2025
1 parent 3bd7fd9 commit 8bba47e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions junit/src/main/java/net/neoforged/fml/junit/JUnitService.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ public void launcherSessionClosed(LauncherSession session) {
var current = FMLLoader.currentOrNull();
if (current != null) {
current.close();
// This is a slightly desparate attempt, but module loaders cannot be closed explicitly.
// Instead, they have to be garbage collected to close the underlying Jar file.
System.gc();
}

if (gameDir != null) {
Expand Down

0 comments on commit 8bba47e

Please sign in to comment.