fix issues

pull/410/head
vapao 2021-09-18 00:17:39 +08:00
parent c5b3aadcf9
commit bc88c5c815
1 changed files with 3 additions and 1 deletions

View File

@ -19,7 +19,9 @@ export default observer(function () {
function handleSubmit() { function handleSubmit() {
const {dst_dir, dst_repo} = store.deploy; const {dst_dir, dst_repo} = store.deploy;
if (dst_repo.includes(dst_dir.replace(/\/*$/, ''))) { const t_dst_dir = dst_dir.replace(/\/*$/, '/');
const t_dst_repo = dst_repo.replace(/\/*$/, '/');
if (t_dst_repo.includes(t_dst_dir)) {
return message.error('存储路径不能位于部署路径内') return message.error('存储路径不能位于部署路径内')
} }
setLoading(true); setLoading(true);