diff options
author | Jakob Unterwurzacher | 2020-09-09 11:17:19 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2020-09-09 11:17:19 +0200 |
commit | ac687d53593d8215b881db92fe2d1bbbd2d2d774 (patch) | |
tree | 91254ea710f042118ec4f21d5e9a77982a0037f1 /internal/fusefrontend/node.go | |
parent | 8b1df08b8af38aa50084abe492d0aee395492ede (diff) |
v2api: add Darwin xattr support
Diffstat (limited to 'internal/fusefrontend/node.go')
-rw-r--r-- | internal/fusefrontend/node.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/fusefrontend/node.go b/internal/fusefrontend/node.go index 00d06f5..bc4eb3b 100644 --- a/internal/fusefrontend/node.go +++ b/internal/fusefrontend/node.go @@ -480,7 +480,7 @@ func (n *Node) Rename(ctx context.Context, name string, newParent fs.InodeEmbedd // Easy case. rn := n.rootNode() if rn.args.PlaintextNames { - return fs.ToErrno(unix.Renameat2(dirfd, cName, dirfd2, cName2, uint(flags))) + return fs.ToErrno(syscallcompat.Renameat2(dirfd, cName, dirfd2, cName2, uint(flags))) } // Long destination file name: create .name file nameFileAlreadyThere := false @@ -498,8 +498,8 @@ func (n *Node) Rename(ctx context.Context, name string, newParent fs.InodeEmbedd } // Actual rename tlog.Debug.Printf("Renameat %d/%s -> %d/%s\n", dirfd, cName, dirfd2, cName2) - err = unix.Renameat2(dirfd, cName, dirfd2, cName2, uint(flags)) - if (flags&unix.RENAME_NOREPLACE == 0) && (err == syscall.ENOTEMPTY || err == syscall.EEXIST) { + err = syscallcompat.Renameat2(dirfd, cName, dirfd2, cName2, uint(flags)) + if (flags&syscallcompat.RENAME_NOREPLACE == 0) && (err == syscall.ENOTEMPTY || err == syscall.EEXIST) { // If an empty directory is overwritten we will always get an error as // the "empty" directory will still contain gocryptfs.diriv. // Interestingly, ext4 returns ENOTEMPTY while xfs returns EEXIST. @@ -507,7 +507,7 @@ func (n *Node) Rename(ctx context.Context, name string, newParent fs.InodeEmbedd // again. tlog.Debug.Printf("Rename: Handling ENOTEMPTY") if n2.Rmdir(ctx, newName) == 0 { - err = unix.Renameat2(dirfd, cName, dirfd2, cName2, uint(flags)) + err = syscallcompat.Renameat2(dirfd, cName, dirfd2, cName2, uint(flags)) } } if err != nil { |