We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d127901 commit 06971eaCopy full SHA for 06971ea
library/std/src/sys/fs/mod.rs
@@ -117,9 +117,16 @@ pub fn set_permissions(path: &Path, perm: FilePermissions) -> io::Result<()> {
117
#[cfg(unix)]
118
pub fn set_permissions_nofollow(path: &Path, perm: crate::fs::Permissions) -> io::Result<()> {
119
use crate::fs::OpenOptions;
120
- use crate::os::unix::fs::OpenOptionsExt;
121
122
- OpenOptions::new().custom_flags(libc::O_NOFOLLOW).open(path)?.set_permissions(perm)
+ let mut options = OpenOptions::new();
+
123
+ #[cfg(not(target_os = "espidf"))]
124
+ {
125
+ use crate::os::unix::fs::OpenOptionsExt;
126
+ options.custom_flags(libc::O_NOFOLLOW);
127
+ }
128
129
+ options.open(path)?.set_permissions(perm)
130
}
131
132
#[cfg(not(unix))]
0 commit comments