rclone/cmd/selfupdate/writable_windows.go

17 lines
233 B
Go
Raw Normal View History

// +build windows
package selfupdate
import (
"os"
)
func writable(path string) bool {
info, err := os.Stat(path)
const UserWritableBit = 128
if err == nil {
return info.Mode().Perm()&UserWritableBit != 0
}
return false
}