From 279ec10081f245f4d5bbca8b63485c841f619e35 Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Tue, 19 Jul 2022 07:21:26 +0200 Subject: State update, havent tested --- cdn/src/util/Storage.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'cdn/src/util/Storage.ts') diff --git a/cdn/src/util/Storage.ts b/cdn/src/util/Storage.ts index 89dd5634..728804a0 100644 --- a/cdn/src/util/Storage.ts +++ b/cdn/src/util/Storage.ts @@ -1,6 +1,7 @@ import { FileStorage } from "./FileStorage"; import path from "path"; -import fse from "fs-extra"; +//import fse from "fs-extra"; +import fs from "fs"; import { bgCyan, black } from "picocolors"; import { S3 } from "@aws-sdk/client-s3"; import { S3Storage } from "./S3Storage"; @@ -22,7 +23,8 @@ if (process.env.STORAGE_PROVIDER === "file" || !process.env.STORAGE_PROVIDER) { location = path.join(process.cwd(), "files"); } console.log(`[CDN] storage location: ${bgCyan(`${black(location)}`)}`); - fse.ensureDirSync(location); + //fse.ensureDirSync(location); + fs.mkdirSync(location, {recursive: true}); process.env.STORAGE_LOCATION = location; storage = new FileStorage(); -- cgit 1.4.1