Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 99efa45

Browse files
committedJan 27, 2023
Renamed method for clarity
1 parent 718951e commit 99efa45

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed
 

‎main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ func main() {
180180
panic(err)
181181
}
182182

183-
Systray.Update(newPath)
183+
Systray.RestartWith(newPath)
184184
} else {
185185
// Otherwise copy to a path with -temp suffix
186186
err := copyExe(srcPath.String(), updater.TempPath(srcPath.String()))

‎systray/systray.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ func (s *Systray) Resume() {
9090
s.Restart()
9191
}
9292

93-
// Update restarts the program with the given path
94-
func (s *Systray) Update(path string) {
93+
// RestartWith restarts the program with the given path
94+
func (s *Systray) RestartWith(path string) {
9595
s.path = path
9696
s.Restart()
9797
}

‎update.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,6 @@ func updateHandler(c *gin.Context) {
6464
path = updater.TempPath(path)
6565

6666
c.JSON(200, gin.H{"success": "Please wait a moment while the agent reboots itself"})
67-
Systray.Update(path)
67+
68+
Systray.RestartWith(path)
6869
}

0 commit comments

Comments
 (0)
Please sign in to comment.