Skip to content

Commit f2aad39

Browse files
committed
fix strange temp binary file behavior:
if the binary ends with -temp gets restarted all over
1 parent 8ecf2da commit f2aad39

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

main.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,13 @@ func main() {
132132

133133
// If the executable is temporary, copy it to the full path, then restart
134134
if strings.Contains(path, "-temp") {
135-
err := copyExe(path, updater.BinPath(path))
135+
newPath := updater.BinPath(path)
136+
err := copyExe(path, newPath)
136137
if err != nil {
137138
panic(err)
138139
}
139140

140-
Systray.Restart()
141+
Systray.Update(newPath)
141142
} else {
142143
// Otherwise copy to a path with -temp suffix
143144
err := copyExe(path, updater.TempPath(path))

0 commit comments

Comments
 (0)