From 4260857c03ee8df55377fe5d24e260f1f4146974 Mon Sep 17 00:00:00 2001 From: Alex Hicks Date: Tue, 19 Nov 2024 19:27:33 -0500 Subject: [PATCH] Fix series detection --- api/src/service/file/file.service.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/api/src/service/file/file.service.ts b/api/src/service/file/file.service.ts index b6680ea..20aefa2 100644 --- a/api/src/service/file/file.service.ts +++ b/api/src/service/file/file.service.ts @@ -41,7 +41,6 @@ export class FileService { async stat(key: string) { const filename = this.getFilename(key); try { - await fs.mkdir(filename, { recursive: true }); return await fs.stat(filename); } catch {} } @@ -67,7 +66,10 @@ export class FileService { } getFilename(key: string) { - return path.resolve(this.root, key.replace(/^\//, "").replace(/\.\./g, "")); + return path.resolve( + this.root, + key.replace(/^\//, "").replace(/\.{2}/g, ""), + ); } get root(): string {