diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/game/LauncherHelper.java b/HMCL/src/main/java/org/jackhuang/hmcl/game/LauncherHelper.java index e5caa832e..6a44ec838 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/game/LauncherHelper.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/game/LauncherHelper.java @@ -831,6 +831,10 @@ public final class LauncherHelper { @Override public void onExit(int exitCode, ExitType exitType) { + if (showLogs) { + Platform.runLater(() -> logWindow.logLine(String.format("[HMCL ProcessListener] Minecraft exit with code %d.", exitCode), Log4jLevel.INFO)); + } + launchingLatch.countDown(); if (exitType == ExitType.INTERRUPTED) diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/game/LogExporter.java b/HMCL/src/main/java/org/jackhuang/hmcl/game/LogExporter.java index a8c4313ae..844c33ad1 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/game/LogExporter.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/game/LogExporter.java @@ -92,7 +92,7 @@ public final class LogExporter { for (Path file : stream) { if (Files.isRegularFile(file)) { - FileTime time = Files.readAttributes(file, BasicFileAttributes.class).creationTime(); + FileTime time = Files.readAttributes(file, BasicFileAttributes.class).lastModifiedTime(); if (time.toMillis() >= processStartTime) { String crashLog = Logging.filterForbiddenToken(FileUtils.readText(file)); zipper.putTextFile(crashLog, file.getFileName().toString());