1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-09-22 02:31:36 +02:00

Merge pull request #4 from jhcpeixoto/master

FIX MKDIR
This commit is contained in:
Flam3rboy 2021-06-25 21:32:11 +02:00 committed by GitHub
commit 5bfdad897b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1790 deletions

1793
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -16,7 +16,7 @@ export class FileStorage implements Storage {
}
async set(path: string, value: any) {
path = join(process.env.STORAGE_LOCATION || "", path);
path = join(process.env.STORAGE_LOCATION || "", path).replace(/[\\]/g, "/");
const dir = path.split("/").slice(0, -1).join("/");
await fs.mkdir(dir, { recursive: true }).caught();