mirror of
https://github.com/fumiama/terasu-cloudflared.git
synced 2026-06-22 20:20:59 +08:00
TUN-528: Move cloudflared into a separate repo
This commit is contained in:
19
vendor/github.com/equinox-io/equinox/internal/go-update/hide_windows.go
generated
vendored
Normal file
19
vendor/github.com/equinox-io/equinox/internal/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