mirror of
https://github.com/whyour/qinglong.git
synced 2026-12-01 09:45:36 +08:00
修复日志路径拼接规则
This commit is contained in:
1 parent
8fac58d73f
commit
d687e79b6c
2 files changed
+61
-31
No files matched your search
+11
-1
@@ -408,7 +408,17 @@ export default class CronService {
|
||||
command.lastIndexOf('.') !== -1
|
||||
? command.lastIndexOf('.')
|
||||
: command.length;
|
||||
return command.substring(start, end);
|
||||
|
||||
const tmpStr = command.startsWith('/') ? command.substring(1) : command;
|
||||
const index = tmpStr.indexOf('/') !== -1 ? tmpStr.indexOf('/') : 0;
|
||||
if (index) {
|
||||
console.log(
|
||||
`${tmpStr.substring(0, index)}_${command.substring(start, end)}`,
|
||||
);
|
||||
return `${tmpStr.substring(0, index)}_${command.substring(start, end)}`;
|
||||
} else {
|
||||
return command.substring(start, end);
|
||||
}
|
||||
}
|
||||
|
||||
private make_command(tab: Crontab) {
|
||||
|
||||
Reference in new issue
Block a user