From 9268958a2fc9a39c33d81bf84e56768a35be0be1 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Thu, 7 Jan 2021 12:38:08 -0700 Subject: [PATCH] Remove filetype from the names of the hibernated games. --- server/src/main.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/src/main.ts b/server/src/main.ts index 6294c24..3f0aad2 100644 --- a/server/src/main.ts +++ b/server/src/main.ts @@ -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);