From cb11be7602b6e48a05e207129b4295f0fff17f60 Mon Sep 17 00:00:00 2001 From: Matthew R Date: Thu, 1 Apr 2021 23:16:48 -0400 Subject: [PATCH] fix Hiro's fuckups again --- src/class/LocalStorage.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/class/LocalStorage.ts b/src/class/LocalStorage.ts index cc076f7..4db0d00 100644 --- a/src/class/LocalStorage.ts +++ b/src/class/LocalStorage.ts @@ -1,7 +1,6 @@ /* eslint-disable no-constant-condition */ import { promises as fs, accessSync, constants, writeFileSync } from 'fs'; import { promisify } from 'util'; -import { join } from 'path'; import { gzip, gzipSync, unzip } from 'zlib'; type JSONData = [{ key: string, value: any }?]; @@ -19,7 +18,7 @@ export default class LocalStorage { private locked: boolean = false; constructor(dbName: string, dir = `${__dirname}/../../localstorage`) { - this.storagePath = join(__dirname, '../../localstorage') || dir; + this.storagePath = `${dir}/${dbName}.json.gz`; this.init(); }