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/FileStorage.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cdn/src/util/FileStorage.ts') diff --git a/cdn/src/util/FileStorage.ts b/cdn/src/util/FileStorage.ts index 376ce007..ed007abb 100644 --- a/cdn/src/util/FileStorage.ts +++ b/cdn/src/util/FileStorage.ts @@ -1,8 +1,7 @@ import { Storage } from "./Storage"; import fs from "fs"; -import fse from "fs-extra"; +//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"); @@ -36,7 +35,8 @@ export class FileStorage implements Storage { async set(path: string, value: any) { path = getPath(path); - fse.ensureDirSync(dirname(path)); + //fse.ensureDirSync(dirname(path)); + fs.mkdirSync(dirname(path), {recursive: true}); value = Readable.from(value); const cleaned_file = fs.createWriteStream(path); -- cgit 1.5.1