Logo
Explore Help
Sign In
TheArchive/restic
1
0
Fork 0
You've already forked restic
mirror of https://github.com/restic/restic.git synced 2025-05-09 19:16:55 +00:00
Code Issues Packages Projects Releases Wiki Activity
restic/internal/selfupdate/download_unix.go

11 lines
187 B
Go
Raw Normal View History

Refactor file handing for self-update. * 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.
2021-08-23 12:21:09 -05:00
//go:build !windows
// +build !windows
package selfupdate
// Remove the target binary.
Replace lots of unused parameters with _ The parameters are required by the implemented function signature or interface.
2023-05-18 19:27:38 +02:00
func removeResticBinary(_, _ string) error {
Refactor file handing for self-update. * 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.
2021-08-23 12:21:09 -05:00
// removed on rename on this platform
return nil
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.6 Page: 114ms Template: 4ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API