fusefrontend: fix compile failure on Darwin
Failure was: + GOOS=darwin + GOARCH=amd64 + go build -tags without_openssl # github.com/rfjakob/gocryptfs/internal/fusefrontend internal/fusefrontend/fs_dir.go:159:60: cannot use origMode | 448 (type uint16) as type uint32 in argument to syscallcompat.Fchmodat internal/fusefrontend/fs_dir.go:170:33: cannot use origMode (type uint16) as type uint32 in argument to syscallcompat.Fchmodat
This commit is contained in:
parent
d4b7f42c3b
commit
abbdaa8ea4
@ -158,7 +158,8 @@ func (fs *FS) Rmdir(relPath string, context *fuse.Context) (code fuse.Status) {
|
||||
tlog.Debug.Printf("Rmdir: Stat: %v", err)
|
||||
return fuse.ToStatus(err)
|
||||
}
|
||||
origMode := st.Mode & 0777
|
||||
// This cast is needed on Darwin, where st.Mode is uint16.
|
||||
origMode := uint32(st.Mode & 0777)
|
||||
err = syscallcompat.Fchmodat(parentDirFd, cName, origMode|0700, unix.AT_SYMLINK_NOFOLLOW)
|
||||
if err != nil {
|
||||
tlog.Debug.Printf("Rmdir: Fchmodat failed: %v", err)
|
||||
|
Loading…
Reference in New Issue
Block a user