fuck
This commit is contained in:
parent
5a99fbb4a7
commit
82a63c538b
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user