From be853d1746792e463f44a02c9a3a010dc2873e90 Mon Sep 17 00:00:00 2001 From: Skillet Date: Mon, 8 May 2023 16:41:37 -0400 Subject: [PATCH] Update db-log-addOn.js --- db-log-addOn.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/db-log-addOn.js b/db-log-addOn.js index 055f64d..5c656e0 100644 --- a/db-log-addOn.js +++ b/db-log-addOn.js @@ -6,6 +6,8 @@ import path from "path"; import fs from "fs"; import { open } from "node:fs/promises" +const __dirname = path.dirname(fileURLToPath(import.meta.url)); + const { DataTypes } = Sequelize; const ServerState = { init: 0, @@ -275,7 +277,7 @@ export default class DBLogPlayerTime extends DBLog { if(((this.options.incseed*seeder.seedTime) - (this.options.decseed*(topTime-seeder.seedTime))) > 100) seedid.push(seeder); } - const lcladminpath = path.resolve("../../../", this.options.whitelistfilepath); + const lcladminpath = path.resolve(__dirname, "../../../", this.options.whitelistfilepath); this.verbose(1, "trying to write to directory: ", lcladminpath); if(!fs.existsSync(lcladminpath)) { this.verbose(1, "WARNING: auto whitelist admins file not found");