From b874e999ab0a7d3d0954d3a32e8593c5dab63895 Mon Sep 17 00:00:00 2001 From: Joaquim Peixoto Date: Fri, 25 Jun 2021 20:28:59 +0100 Subject: [PATCH] 4 TABS --- src/util/FileStorage.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/util/FileStorage.ts b/src/util/FileStorage.ts index 42b32528..48b4a6a5 100644 --- a/src/util/FileStorage.ts +++ b/src/util/FileStorage.ts @@ -17,14 +17,14 @@ export class FileStorage implements Storage { async set(path: string, value: any) { path = join(process.env.STORAGE_LOCATION || "", path).replace(/[\\]/g, "/"); - const dir = path.split("/").slice(0, -1).join("/"); - await fs.mkdir(dir, { recursive: true }).caught(); + const dir = path.split("/").slice(0, -1).join("/"); + await fs.mkdir(dir, { recursive: true }).caught(); - return fs.writeFile(path, value, { encoding: "binary" }); + return fs.writeFile(path, value, { encoding: "binary" }); } async delete(path: string) { path = join(process.env.STORAGE_LOCATION || "", path); await fs.unlink(path); } -} \ No newline at end of file +}