mirror of
https://github.com/minio/minio.git
synced 2025-11-10 22:10:12 -05:00
Support in-place upgrades of new minio binary and releases. (#4961)
This PR allows 'minio update' to not only shows update banner but also allows for in-place upgrades. Updates are done safely by validating the downloaded sha256 of the binary. Fixes #4781
This commit is contained in:
committed by
Dee Koder
parent
8c08571cd9
commit
eb7c690ea9
19
vendor/github.com/inconshreveable/go-update/hide_windows.go
generated
vendored
Normal file
19
vendor/github.com/inconshreveable/go-update/hide_windows.go
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
package update
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
func hideFile(path string) error {
|
||||
kernel32 := syscall.NewLazyDLL("kernel32.dll")
|
||||
setFileAttributes := kernel32.NewProc("SetFileAttributesW")
|
||||
|
||||
r1, _, err := setFileAttributes.Call(uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(path))), 2)
|
||||
|
||||
if r1 == 0 {
|
||||
return err
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user