Skip to content
This repository has been archived by the owner on May 8, 2022. It is now read-only.

Commit

Permalink
Remove temporary archive after restore + remove temporary folder even…
Browse files Browse the repository at this point in the history
… if port has not changed. Closes #12
  • Loading branch information
SCP002 committed Apr 3, 2022
1 parent 265c63e commit ba7bbe3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ func xteveRestore(archive string) (newWebURL string, err error) {

tmpRestore = System.Folder.Temp + "restore" + string(os.PathSeparator)

defer os.RemoveAll(tmpRestore)
defer os.Remove(archive)

err = checkFolder(tmpRestore)
if err != nil {
return
Expand Down Expand Up @@ -201,8 +204,6 @@ func xteveRestore(archive string) (newWebURL string, err error) {
var url = System.URLBase + "/web/"
newWebURL = strings.Replace(url, ":"+oldPort, ":"+newPort, 1)

os.RemoveAll(tmpRestore)

return
}

Expand Down

0 comments on commit ba7bbe3

Please sign in to comment.