feat: store .jsdos bundle inside game directory instead of as flat file
Build & Deploy / build-and-deploy (push) Successful in 52s
Build & Deploy / build-and-deploy (push) Successful in 52s
Before: data/games/{id}.jsdos (flat, alongside the game dir)
After: data/games/{id}/{id}.jsdos (inside the game directory)
Benefits:
- Delete is atomic — removing the game dir removes everything
- Cleaner data directory structure
- No orphan .jsdos files on delete
Also updated frontend bundleUrl() to use game.bundle_file from
the backend, making it path-agnostic. Old flat layout is still
served via StaticResource for backward compat.
This commit is contained in:
@@ -106,7 +106,9 @@ export function artworkUrl(path) {
|
||||
/** Get game bundle URL for normal play */
|
||||
export function bundleUrl(game) {
|
||||
if (!game) return null;
|
||||
return `/games/${game.id}.jsdos`;
|
||||
// Use the bundle_file path from the backend (handles both old flat layout
|
||||
// and new in-directory layout transparently)
|
||||
return `/games/${game.bundle_file}`;
|
||||
}
|
||||
|
||||
/** Get game bundle URL for setup mode (runs SETUP.EXE instead) */
|
||||
|
||||
Reference in New Issue
Block a user