mirror of
https://github.com/whyour/qinglong.git
synced 2026-06-30 20:35:09 +08:00
修复日志路径拼接规则
This commit is contained in:
+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