fix: 解决复制导致的快照失败问题 (#4547)

This commit is contained in:
ssongliu 2024-04-17 15:28:07 +08:00 committed by GitHub
parent f1421ba7f9
commit c5bb8dab8c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -43,7 +43,7 @@ func snapPanel(snap snapHelper, targetDir string) {
defer snap.Wg.Done()
_ = snapshotRepo.UpdateStatus(snap.Status.ID, map[string]interface{}{"panel": constant.Running})
status := constant.StatusDone
if err := common.CopyFile("/usr/local/bin/1panel", targetDir); err != nil {
if err := common.CopyFile("/usr/local/bin/1panel", path.Join(targetDir, "1panel")); err != nil {
status = err.Error()
}