Do not fail due to file permissions on creation

Matches Posix.
This commit is contained in:
Ian Douglas Scott
2017-07-15 07:01:21 -07:00
parent bc2e8c2923
commit cae1402f5a
-10
View File
@@ -269,16 +269,6 @@ impl Scheme for FileScheme {
node.1.gid = gid;
fs.write_at(node.0, &node.1)?;
if (flags & O_ACCMODE == O_RDONLY || flags & O_ACCMODE == O_RDWR) && ! node.1.permission(uid, gid, Node::MODE_READ) {
// println!("file not readable {:o}", node.1.mode);
return Err(Error::new(EACCES));
}
if (flags & O_ACCMODE == O_WRONLY || flags & O_ACCMODE == O_RDWR) && ! node.1.permission(uid, gid, Node::MODE_WRITE) {
// println!("file not writable {:o}", node.1.mode);
return Err(Error::new(EACCES));
}
if dir {
Box::new(DirResource::new(path.to_string(), node.0, Vec::new()))
} else {