diff options
author | Jakob Unterwurzacher | 2016-10-10 08:43:09 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2016-10-10 08:53:29 +0200 |
commit | 828f7184838be17d04ff4d78d8b066f4947406f3 (patch) | |
tree | b400497ca98f5902a2dbc22baeaccab4874a9572 /internal/fusefrontend/fs.go | |
parent | 40420cb4cd2997260fd00a2c1566ea62c146f6eb (diff) |
fusefrontend: Also preserve the owner in Mkdir
This already worked for files but was missing for dirs.
Diffstat (limited to 'internal/fusefrontend/fs.go')
-rw-r--r-- | internal/fusefrontend/fs.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/fusefrontend/fs.go b/internal/fusefrontend/fs.go index 26a5b5e..33053de 100644 --- a/internal/fusefrontend/fs.go +++ b/internal/fusefrontend/fs.go @@ -153,10 +153,11 @@ func (fs *FS) Create(path string, flags uint32, mode uint32, context *fuse.Conte return nil, fuse.ToStatus(err) } } + // Set owner if fs.args.PreserveOwner { err = fd.Chown(int(context.Owner.Uid), int(context.Owner.Gid)) if err != nil { - tlog.Warn.Printf("PreserveOwner: Chown failed: %v", err) + tlog.Warn.Printf("Create: Chown failed: %v", err) } } return NewFile(fd, writeOnly, fs.contentEnc) |