fix local setup

This commit is contained in:
joneugster
2023-11-30 09:20:16 +01:00
parent 8e8026aa38
commit 07b6525c58
+6 -6
View File
@@ -60,18 +60,18 @@ function startServerProcess(owner, repo) {
console.error(`No local games in production mode.`)
return
}
} else {
if(!fs.existsSync(path.join(__dirname, '..', 'games'))) {
console.error(`Did not find the following folder: ${path.join(__dirname, '..', 'games')}`)
console.error('Did you already import any games?')
return
}
}
let game_dir = (owner == 'local') ?
path.join(__dirname, '..', '..', repo) : // note: here we need `repo` to be case sensitive
path.join(__dirname, '..', 'games', `${owner}`, `${repo.toLowerCase()}`)
if(!fs.existsSync(path.join(__dirname, '..', 'games'))) {
console.error(`Did not find the following folder: ${path.join(__dirname, '..', 'games')}`)
console.error('Did you already import any games?')
return
}
if(!fs.existsSync(game_dir)) {
console.error(`Game '${game_dir}' does not exist!`)
return