fix: resolveSibling using filename only, not full bundle path
Build & Deploy / build-and-deploy (push) Successful in 46s

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.
This commit is contained in:
Hermes Agent
2026-06-01 12:48:04 +02:00
parent 4044ef3786
commit f297d30248
+1 -1
View File
@@ -171,7 +171,7 @@ public class GameService {
byte[] newJsdosJson = buildJsdosJsonBytes(executable); byte[] newJsdosJson = buildJsdosJsonBytes(executable);
// Patch the ZIP: read old, write new with modified config entries // 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)); try (var zis = new java.util.zip.ZipInputStream(Files.newInputStream(bundlePath));
var zos = new java.util.zip.ZipOutputStream(Files.newOutputStream(tmpPath))) { var zos = new java.util.zip.ZipOutputStream(Files.newOutputStream(tmpPath))) {