fix: resolveSibling using filename only, not full bundle path
Build & Deploy / build-and-deploy (push) Successful in 46s
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:
@@ -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))) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user