mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 23:06:06 +08:00
修复脚本管理树结构
This commit is contained in:
parent
4e95d62933
commit
7b769da4e2
|
@ -43,7 +43,7 @@ export default (app: Router) => {
|
||||||
children.push({
|
children.push({
|
||||||
title: childFile,
|
title: childFile,
|
||||||
value: childFile,
|
value: childFile,
|
||||||
key: childFile,
|
key: `${fileOrDir}-${childFile}`,
|
||||||
mtime: statObj.mtimeMs,
|
mtime: statObj.mtimeMs,
|
||||||
parent: fileOrDir,
|
parent: fileOrDir,
|
||||||
});
|
});
|
||||||
|
|
|
@ -106,7 +106,7 @@ run_normal() {
|
||||||
|
|
||||||
cd $dir_scripts
|
cd $dir_scripts
|
||||||
local relative_path="${first_param%/*}"
|
local relative_path="${first_param%/*}"
|
||||||
if [[ ! -z ${relative_path} ]]; then
|
if [[ ! -z ${relative_path} ]] && [[ ${first_param} =~ "/" ]]; then
|
||||||
cd ${relative_path}
|
cd ${relative_path}
|
||||||
first_param=${first_param/$relative_path\//}
|
first_param=${first_param/$relative_path\//}
|
||||||
fi
|
fi
|
||||||
|
@ -174,7 +174,7 @@ run_concurrent() {
|
||||||
|
|
||||||
cd $dir_scripts
|
cd $dir_scripts
|
||||||
local relative_path="${first_param%/*}"
|
local relative_path="${first_param%/*}"
|
||||||
if [[ ! -z ${relative_path} ]]; then
|
if [[ ! -z ${relative_path} ]] && [[ ${first_param} =~ "/" ]]; then
|
||||||
cd ${relative_path}
|
cd ${relative_path}
|
||||||
first_param=${first_param/$relative_path\//}
|
first_param=${first_param/$relative_path\//}
|
||||||
fi
|
fi
|
||||||
|
@ -248,7 +248,7 @@ run_designated() {
|
||||||
|
|
||||||
cd $dir_scripts
|
cd $dir_scripts
|
||||||
local relative_path="${file_param%/*}"
|
local relative_path="${file_param%/*}"
|
||||||
if [[ ! -z ${relative_path} ]]; then
|
if [[ ! -z ${relative_path} ]] && [[ ${file_param} =~ "/" ]]; then
|
||||||
cd ${relative_path}
|
cd ${relative_path}
|
||||||
file_param=${file_param/$relative_path\//}
|
file_param=${file_param/$relative_path\//}
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue
Block a user