From f297d302482bd616b2ace529b3714e98436e3030 Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Mon, 1 Jun 2026 12:48:04 +0200 Subject: [PATCH] fix: resolveSibling using filename only, not full bundle path bundleFile changed from 'wolf3d.jsdos' to 'wolf3d/wolf3d.jsdos' when bundles moved inside game directories. resolveSibling(bundleFile + '.tmp') produced a wrong nested path. Now uses bundlePath.getFileName() to get just the filename part before appending .tmp. --- src/main/java/com/dostalgia/GameService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/dostalgia/GameService.java b/src/main/java/com/dostalgia/GameService.java index 5a31600..0c34d1b 100644 --- a/src/main/java/com/dostalgia/GameService.java +++ b/src/main/java/com/dostalgia/GameService.java @@ -171,7 +171,7 @@ public class GameService { byte[] newJsdosJson = buildJsdosJsonBytes(executable); // Patch the ZIP: read old, write new with modified config entries - Path tmpPath = bundlePath.resolveSibling(bundleFile + ".tmp"); + Path tmpPath = bundlePath.resolveSibling(bundlePath.getFileName() + ".tmp"); try (var zis = new java.util.zip.ZipInputStream(Files.newInputStream(bundlePath)); var zos = new java.util.zip.ZipOutputStream(Files.newOutputStream(tmpPath))) {