mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-07 12:33:14 +00:00
Open files in binary mode. Closes #3948
This commit is contained in:
parent
dc5b0b9410
commit
180d050138
@ -1041,7 +1041,7 @@ pub fn stdin() -> @Reader {
|
||||
|
||||
pub fn file_reader(path: &Path) -> Result<@Reader, ~str> {
|
||||
let f = do path.to_str().as_c_str |pathbuf| {
|
||||
do "r".as_c_str |modebuf| {
|
||||
do "rb".as_c_str |modebuf| {
|
||||
unsafe { libc::fopen(pathbuf, modebuf as *libc::c_char) }
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user