mirror of
https://github.com/bewcloud/bewcloud.git
synced 2026-03-11 08:54:49 +00:00
fix: Don’t forcefully make absolute rootPath relative to CWD
This commit is contained in:
parent
31855f4802
commit
829189d0b3
1 changed files with 6 additions and 3 deletions
|
|
@ -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']> {
|
||||
|
|
|
|||
Loading…
Reference in a new issue