1 files changed, 2 insertions, 3 deletions
diff --git a/cdn/src/util/FileStorage.ts b/src/cdn/util/FileStorage.ts
index 84ecf556..955c570b 100644
--- a/cdn/src/util/FileStorage.ts
+++ b/src/cdn/util/FileStorage.ts
@@ -1,10 +1,9 @@
import { Storage } from "./Storage";
import fs from "fs";
-import fse from "fs-extra";
import { join, relative, dirname } from "path";
import "missing-native-js-functions";
import { Readable } from "stream";
-import ExifTransformer = require("exif-be-gone");
+import ExifTransformer from "exif-be-gone";
// TODO: split stored files into separate folders named after cloned route
@@ -36,7 +35,7 @@ export class FileStorage implements Storage {
async set(path: string, value: any) {
path = getPath(path);
- fse.ensureDirSync(dirname(path));
+ if (!fs.existsSync(dirname(path))) fs.mkdirSync(dirname(path));
value = Readable.from(value);
const cleaned_file = fs.createWriteStream(path);
|