summary refs log tree commit diff
path: root/cdn/src/util/FileStorage.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/FileStorage.ts
parentupdate node types to v18, ditch node-fetch (diff)
downloadserver-279ec10081f245f4d5bbca8b63485c841f619e35.tar.xz
State update, havent tested
Diffstat (limited to 'cdn/src/util/FileStorage.ts')
-rw-r--r--cdn/src/util/FileStorage.ts6
1 files changed, 3 insertions, 3 deletions
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);