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 e933877 commit de81af5Copy full SHA for de81af5
src/io/mod.rs
@@ -151,7 +151,16 @@ impl InputHandle {
151
let mut buf: [u8; BUFSIZE] = [0; BUFSIZE];
152
153
loop {
154
- let n = self.inner.read(&mut buf[..])?;
+ let n = match self.inner.read(&mut buf[..]) {
155
+ Ok(n) => n,
156
+
157
+ // There are times when the engine tries to open and read
158
+ // directories. When closing out such a handle, we'll get this
159
+ // error, but we should ignore it.
160
+ Err(ref ioe) if ioe.raw_os_error() == Some(libc::EISDIR) => return Ok(()),
161
162
+ Err(e) => return Err(e.into()),
163
+ };
164
165
if n == 0 {
166
break;
0 commit comments