mirror of
https://github.com/restic/restic.git
synced 2024-12-27 02:08:37 +00:00
0ba9d4ced7
* Write new file payload to a temp file before touching the original binary. Minimizes the possibility of failing mid-write and corrupting the binary. * On Windows, move the original binary out to a temp file rather than removing it as the running binary is locked. Fixes issue #2248.
10 lines
194 B
Go
10 lines
194 B
Go
//go:build !windows
|
|
// +build !windows
|
|
|
|
package selfupdate
|
|
|
|
// Remove the target binary.
|
|
func removeResticBinary(dir, target string) error {
|
|
// removed on rename on this platform
|
|
return nil
|
|
}
|