Skip to content

Commit faab629

Browse files
committed
also pass mode flag to openat()
1 parent 43847b2 commit faab629

File tree

1 file changed

+3
-1
lines changed
  • library/std/src/sys/unix

1 file changed

+3
-1
lines changed

library/std/src/sys/unix/fs.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1103,7 +1103,9 @@ impl File {
11031103
openat64(
11041104
dirfd.as_raw_fd(),
11051105
path.as_ptr(),
1106-
flags
1106+
flags,
1107+
// see previous comment why this cast is necessary
1108+
opts.mode as c_int
11071109
)
11081110
})?
11091111
} else {

0 commit comments

Comments
 (0)