Maybe fix os.open

This commit is contained in:
Noah
2019-09-22 14:46:46 -05:00
committed by GitHub
parent 87f496ed3e
commit 46c91414ad

View File

@@ -121,10 +121,10 @@ pub fn os_open(
};
}
if bit_contains!(libc::O_RDWR) {
options.read(true).write(true);
} else if bit_contains!(libc::O_WRONLY) {
if bit_contains!(libc::O_WRONLY) {
options.write(true);
} else if bit_contains!(libc::O_RDWR) {
options.read(true).write(true);
} else if bit_contains!(libc::O_RDONLY) {
options.read(true);
}