mirror of
https://github.com/whyour/qinglong.git
synced 2026-06-30 20:35:09 +08:00
修复获取日志相对目录
This commit is contained in:
@@ -360,7 +360,7 @@ export default class CronService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (doc.log_path) {
|
if (doc.log_path) {
|
||||||
const relativeDir = `${doc.log_path.replace(/\/[^\/]\..*/, '')}`;
|
const relativeDir = path.dirname(`${doc.log_path}`);
|
||||||
const dir = path.resolve(config.logPath, relativeDir);
|
const dir = path.resolve(config.logPath, relativeDir);
|
||||||
if (existsSync(dir)) {
|
if (existsSync(dir)) {
|
||||||
let files = await promises.readdir(dir);
|
let files = await promises.readdir(dir);
|
||||||
|
|||||||
Reference in New Issue
Block a user