This commit is contained in:
Rph :3 2025-06-06 21:40:32 +02:00
parent 5a99fbb4a7
commit 82a63c538b
No known key found for this signature in database

View File

@ -4,7 +4,7 @@ import { join } from 'node:path';
import z from 'zod';
import { DataRoot } from './env.js';
const games_dir = readdirSync('data/games');
const games_dir = readdirSync(join(DataRoot, 'games'));
const manifest = z.object({
name: z.string(),
@ -19,7 +19,7 @@ const manifest = z.object({
const manifestCache: Map<string, z.infer<typeof manifest>> = new Map();
for (let game of games_dir) {
const manifestContent = manifest.parse(JSON.parse(readFileSync('data/games/' + game + '/manifest.json', 'utf-8')));
const manifestContent = manifest.parse(JSON.parse(readFileSync(join(DataRoot, 'games', game, 'manifest.json'), 'utf-8')));
manifestCache.set(game, manifestContent);
}