From 829189d0b30cb30d7acbf03d18f5cee2cee951db Mon Sep 17 00:00:00 2001 From: Erin of Yukis Date: Wed, 3 Dec 2025 06:47:53 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20Don=E2=80=99t=20forcefully=20make=20abso?= =?UTF-8?q?lute=20rootPath=20relative=20to=20CWD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/config.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/config.ts b/lib/config.ts index 69d4c59..e4d18cb 100644 --- a/lib/config.ts +++ b/lib/config.ts @@ -1,3 +1,4 @@ +import { join, isAbsolute } from '@std/path'; import { UserModel } from './models/user.ts'; import { Config, OptionalApp } from './types.ts'; @@ -193,9 +194,11 @@ export class AppConfig { static async getFilesRootPath(): Promise { await this.loadConfig(); - const filesRootPath = `${Deno.cwd()}/${this.config.files.rootPath}`; - - return filesRootPath; + if (isAbsolute(this.config.files.rootPath)) { + return this.config.files.rootPath; + } else { + return join(Deno.cwd(), this.config.files.rootPath); + } } static async getEmailConfig(): Promise {