mirror of
https://github.com/rclone/rclone.git
synced 2024-11-27 02:45:16 +01:00
9eab258ffb
Allow downstream packaging to build rclone without selfupdate command: $ go build -tags noselfupdate Fixes #5187
18 lines
257 B
Go
18 lines
257 B
Go
// +build windows
|
|
// +build !noselfupdate
|
|
|
|
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
|
|
}
|