From cbd337701f5d1364df1bc774b8ed55fc07029b10 Mon Sep 17 00:00:00 2001 From: The Arcane Brony Date: Tue, 21 Dec 2021 20:49:58 +0000 Subject: Improve build scripts, strip more fs-extras --- cdn/tests/cdn_endpoints.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cdn/tests/cdn_endpoints.test.js') diff --git a/cdn/tests/cdn_endpoints.test.js b/cdn/tests/cdn_endpoints.test.js index 8cf16748..5a543e54 100644 --- a/cdn/tests/cdn_endpoints.test.js +++ b/cdn/tests/cdn_endpoints.test.js @@ -1,6 +1,6 @@ const dotenv = require("dotenv"); const path = require("path"); -const fse = require("fs-extra"); +const fs = require("fs"); dotenv.config(); // TODO: write unittest to check if FileStorage.ts is working @@ -21,7 +21,7 @@ if (process.env.STORAGE_PROVIDER === "file") { } else { process.env.STORAGE_LOCATION = path.join(__dirname, "..", "files", "/"); } - fse.ensureDirSync(process.env.STORAGE_LOCATION); + if(!fs.existsSync(process.env.STORAGE_LOCATION)) fs.mkdirSync(process.env.STORAGE_LOCATION, {recursive:true}); } const { CDNServer } = require("../dist/Server"); const { Config } = require("@fosscord/util"); -- cgit 1.5.1