fix: Don’t forcefully make absolute rootPath relative to CWD

This commit is contained in:
Erin of Yukis 2025-12-03 06:47:53 +01:00
parent 31855f4802
commit 829189d0b3

View file

@ -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<string> {
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<Config['email']> {