Fixed a mkdir bug on Linux.

Aaron Jacobs 2015-07-24 13:23:39 +10:00
parent ab8c5728eb
commit f8a67d283f
1 changed files with 9 additions and 1 deletions

View File

@ -140,8 +140,16 @@ func Convert(
protocol: protocol,
Parent: InodeID(m.Hdr.Nodeid),
Name: string(name),
Mode: fuseshim.FileMode(in.Mode),
// On Linux, vfs_mkdir calls through to the inode with at most
// permissions and sticky bits set (cf., and fuse
// passes that on directly (cf. In other words,
// the fact that this is a directory is implicit in the fact that the
// opcode is mkdir. But we want the correct mode to go through, so ensure
// that os.ModeDir is set.
Mode: fuseshim.FileMode(in.Mode) | os.ModeDir,
io = to
co = &to.commonOp