Fail in new_stdio_reader when libc.fopen fails.
This commit is contained in:
parent
e96414a6f0
commit
b000bfeedc
1 changed files with 3 additions and 2 deletions
|
|
@ -20,8 +20,9 @@ fn new_stdio_reader(str path) -> stdio_reader {
|
|||
os.libc.fclose(f);
|
||||
}
|
||||
}
|
||||
ret stdio_FILE_reader(os.libc.fopen(_str.buf(path),
|
||||
_str.buf("r")));
|
||||
auto FILE = os.libc.fopen(_str.buf(path), _str.buf("r"));
|
||||
check (FILE as uint != 0u);
|
||||
ret stdio_FILE_reader(FILE);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue