re: old webui

This commit is contained in:
手瓜一十雪
2024-08-11 13:10:31 +08:00
parent bde7d5a5bb
commit 1046b68640
5 changed files with 16 additions and 19 deletions

View File

@@ -9,12 +9,14 @@ export class NapCatPathWrapper {
logsPath: string;
configPath: string;
cachePath: string;
staticPath: string;
constructor(mainPath: string = dirname(fileURLToPath(import.meta.url))) {
this.binaryPath = mainPath;
this.logsPath = path.join(this.binaryPath, 'logs');
this.configPath = path.join(this.binaryPath, 'config');
this.cachePath = path.join(this.binaryPath, 'cache');
this.staticPath = path.join(this.binaryPath, 'static');
if (fs.existsSync(this.logsPath)) {
fs.mkdirSync(this.logsPath, { recursive: true });
}