Skip to content

Commit

Permalink
fix: 解决应用备份或升级失败的问题 (#1306)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssongliu authored Jun 9, 2023
1 parent 8f036a0 commit 7c600a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/app/service/backup_app.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func handleAppBackup(install *model.AppInstall, backupDir, fileName string) erro
return err
}

appPath := fmt.Sprintf("%s/%s", install.GetPath(), install.Name)
appPath := install.GetPath()
if err := handleTar(appPath, tmpDir, "app.tar.gz", ""); err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion backend/app/service/cronjob_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ func handleTar(sourceDir, targetDir, name, exclusionRules string) error {
path := ""
if strings.Contains(sourceDir, "/") {
itemDir := strings.ReplaceAll(sourceDir[strings.LastIndex(sourceDir, "/"):], "/", "")
aheadDir := strings.ReplaceAll(sourceDir, itemDir, "")
aheadDir := sourceDir[:strings.LastIndex(sourceDir, "/")]
path += fmt.Sprintf("-C %s %s", aheadDir, itemDir)
} else {
path = sourceDir
Expand Down

0 comments on commit 7c600a3

Please sign in to comment.