Remove filetype from the names of the hibernated games.
This commit is contained in:
parent
5666a507c8
commit
9268958a2f
1 changed files with 3 additions and 1 deletions
|
|
@ -38,10 +38,12 @@ if (Validate.config(conf)) {
|
|||
|
||||
// Add event listeners if we want to use the datastore saving game system
|
||||
if (conf.datastores.enabled) {
|
||||
log.info(`Loading list of hibernated games`);
|
||||
|
||||
// Get game IDs from datastore
|
||||
hibernatedGames = readdirSync(conf.datastores.directory)
|
||||
.filter(g => g.endsWith(conf.datastores.filetype));
|
||||
.filter(g => g.endsWith(conf.datastores.filetype))
|
||||
.map(f => f.replace(`\.${conf.datastores.filetype}`, ``));
|
||||
|
||||
process.on(`uncaughtException`, processExit);
|
||||
process.on(`SIGINT`, processExit);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue