1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-31 22:18:07 +08:00

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

This commit is contained in:
zhengkunwang223 2023-04-27 15:30:15 +08:00 committed by GitHub
parent eeb5fa81a1
commit bbf610569d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -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 {

View File

@ -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();
}
});
};