summary refs log tree commit diff
path: root/cdn/src/util/Storage.ts
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2022-07-19 07:21:26 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2022-08-09 23:28:27 +0200
commit279ec10081f245f4d5bbca8b63485c841f619e35 (patch)
tree4e58b7bb26fa3f5f60cfc8888b9f37a258146083 /cdn/src/util/Storage.ts
parentupdate node types to v18, ditch node-fetch (diff)
downloadserver-279ec10081f245f4d5bbca8b63485c841f619e35.tar.xz
State update, havent tested
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();