mirror of
https://github.com/whyour/qinglong.git
synced 2025-07-08 04:16:07 +08:00
修复#1614 正确解析多级目录的脚本路径 (#1616)
This commit is contained in:
parent
f7b6237355
commit
8d24949202
|
@ -153,9 +153,13 @@ const CronDetailModal = ({
|
||||||
cmd[1] = cmd[1].replace('/ql/data/scripts/', '');
|
cmd[1] = cmd[1].replace('/ql/data/scripts/', '');
|
||||||
}
|
}
|
||||||
|
|
||||||
let [p, s] = cmd[1].split('/');
|
let p: string, s: string;
|
||||||
if (!s) {
|
let index = cmd[1].lastIndexOf('/');
|
||||||
s = p;
|
if (index >= 0) {
|
||||||
|
s = cmd[1].slice(index + 1);
|
||||||
|
p = cmd[1].slice(0, index);
|
||||||
|
} else {
|
||||||
|
s = cmd[1];
|
||||||
p = '';
|
p = '';
|
||||||
}
|
}
|
||||||
setScriptInfo({ parent: p, filename: s });
|
setScriptInfo({ parent: p, filename: s });
|
||||||
|
|
Loading…
Reference in New Issue
Block a user