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 ae0f307 commit 493a05eCopy full SHA for 493a05e
src/imp/unix/linux.rs
@@ -84,7 +84,10 @@ impl TemporaryFile {
84
// generic Unix implementation would do.
85
let (file, temporary_name) = match create_unnamed_temporary_file(&dir, opts) {
86
Ok(file) => (file, None),
87
- Err(Errno::ENOTSUP) => {
+ // Linux >= 3.11 may return ENOTSUP if the filesystem does not support unnamed
88
+ // temporary files; Linux < 3.11 will return EISDIR because O_TMPFILE is not supported
89
+ // at all.
90
+ Err(Errno::ENOTSUP) | Err(Errno::EISDIR) => {
91
let (file, temporary_name) = create_temporary_file(&dir, opts, &name)?;
92
(file, Some(temporary_name))
93
}
0 commit comments