summary refs log tree commit diff
diff options
context:
space:
mode:
authorJoaquim Peixoto <jhcpeixoto@outlook.pt>2021-06-25 20:28:59 +0100
committerJoaquim Peixoto <jhcpeixoto@outlook.pt>2021-06-25 20:28:59 +0100
commitb874e999ab0a7d3d0954d3a32e8593c5dab63895 (patch)
treeb85e0737f30b197237e506d2a683483620c660f3
parentFIXS (diff)
downloadserver-b874e999ab0a7d3d0954d3a32e8593c5dab63895.tar.xz
4 TABS
-rw-r--r--src/util/FileStorage.ts8
1 files 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 +}