1
0
mirror of https://github.com/rclone/rclone.git synced 2026-01-03 09:03:50 +00:00

cmount: fix Windows compile (thanks Bill Zissimopoulos)

This commit is contained in:
Nick Craig-Wood
2017-05-07 20:48:17 +01:00
parent e1516e0159
commit caf85737c3
2 changed files with 29 additions and 13 deletions

15
cmd/cmount/mount_unix.go Normal file
View File

@@ -0,0 +1,15 @@
// +build cgo
// +build linux darwin freebsd
package cmount
import "golang.org/x/sys/unix"
func init() {
umask = unix.Umask(0) // read the umask
unix.Umask(umask) // set it back to what it was
uid = uint32(unix.Geteuid())
gid = uint32(unix.Getegid())
commandDefintion.Flags().Uint32VarP(&uid, "uid", "", uid, "Override the uid field set by the filesystem.")
commandDefintion.Flags().Uint32VarP(&gid, "gid", "", gid, "Override the gid field set by the filesystem.")
}