fix: 解决本地应用升级失败的问题 (#813)

pull/816/head
zhengkunwang223 2 years ago committed by GitHub
parent eeb5fa81a1
commit bbf610569d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -226,6 +226,10 @@ func upgradeInstall(installId uint, detailId uint) error {
}
detailDir := path.Join(constant.ResourceDir, "apps", install.App.Key, "versions", detail.Version)
if install.App.Resource == constant.AppResourceLocal {
detailDir = path.Join(constant.ResourceDir, "localApps", strings.TrimPrefix(install.App.Key, "local"), "versions", detail.Version)
}
cmd := exec.Command("/bin/bash", "-c", fmt.Sprintf("cp -rf %s/* %s", detailDir, install.GetPath()))
stdout, err := cmd.CombinedOutput()
if err != nil {

@ -183,7 +183,9 @@ const saveContent = (closePage: boolean) => {
loading.value = false;
open.value = !closePage;
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
handleClose();
if (closePage) {
handleClose();
}
});
};

Loading…
Cancel
Save