Skip to content

Commit dffac0d

Browse files
committed
do not set the file type to an error code
1 parent 0a9ea7e commit dffac0d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/shims/unix/fs.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,10 @@ trait EvalContextExtPrivate<'tcx>: crate::MiriInterpCxExt<'tcx> {
339339
_ => interp_ok(this.eval_libc("DT_UNKNOWN").to_u8()?.into()),
340340
}
341341
}
342-
Err(e) => this.io_error_to_errnum(e)?.to_i32(),
342+
Err(_) => {
343+
// Fallback on error
344+
interp_ok(this.eval_libc("DT_UNKNOWN").to_u8()?.into())
345+
}
343346
}
344347
}
345348
}

0 commit comments

Comments
 (0)