Refactor path_get and fix flags in path_open

This commit is contained in:
Jakub Konka
2019-06-13 16:53:20 +02:00
committed by Dan Gohman
parent b35719fe4a
commit a11f2b1d3a
2 changed files with 147 additions and 173 deletions

View File

@@ -337,10 +337,10 @@ pub(crate) fn path_open(
let mut nix_all_oflags = if read && write {
OFlag::O_RDWR
} else if read {
OFlag::O_RDONLY
} else {
} else if write {
OFlag::O_WRONLY
} else {
OFlag::O_RDONLY
};
// on non-Capsicum systems, we always want nofollow