summary refs log tree commit diff
path: root/cdn/src/util/Storage.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cdn/src/util/Storage.ts')
-rw-r--r--cdn/src/util/Storage.ts6
1 files changed, 4 insertions, 2 deletions
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();