fix: remove java.nio.file.Path import conflicting with @Path annotation
Build & Deploy / build-and-deploy (push) Successful in 1m1s
Build & Deploy / build-and-deploy (push) Successful in 1m1s
This commit is contained in:
@@ -7,7 +7,6 @@ import jakarta.ws.rs.core.Response;
|
||||
import jakarta.ws.rs.core.StreamingOutput;
|
||||
import java.nio.file.NoSuchFileException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.*;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
@@ -106,7 +105,7 @@ public class GameResource {
|
||||
if ("sockdrive".equals(game.getBundleType())) {
|
||||
// ZIP all game files on the fly, excluding metadata
|
||||
StreamingOutput stream = output -> {
|
||||
Path gameDir = svc.gameDir(id);
|
||||
var gameDir = svc.gameDir(id);
|
||||
try (var zos = new ZipOutputStream(output)) {
|
||||
Files.walk(gameDir)
|
||||
.filter(Files::isRegularFile)
|
||||
@@ -129,7 +128,7 @@ public class GameResource {
|
||||
.build();
|
||||
} else {
|
||||
// Standard .jsdos bundle
|
||||
Path bundlePath = svc.getGamesDir().resolve(game.getBundleFile());
|
||||
var bundlePath = svc.getGamesDir().resolve(game.getBundleFile());
|
||||
if (!Files.exists(bundlePath)) {
|
||||
return Response.status(404).entity(Map.of("error", "Bundle file not found")).build();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user