Skip to content

Commit

Permalink
Open files in binary mode. Closes #3948
Browse files Browse the repository at this point in the history
  • Loading branch information
darkf committed Aug 5, 2013
1 parent dc5b0b9 commit 180d050
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libstd/io.rs
Expand Up @@ -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) }
}
};
Expand Down

5 comments on commit 180d050

@bors
Copy link
Contributor

@bors bors commented on 180d050 Aug 5, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from pcwalton
at darkf@180d050

@bors
Copy link
Contributor

@bors bors commented on 180d050 Aug 5, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging darkf/rust/fix-3948 = 180d050 into auto

@bors
Copy link
Contributor

@bors bors commented on 180d050 Aug 5, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

darkf/rust/fix-3948 = 180d050 merged ok, testing candidate = 29099e4

@bors
Copy link
Contributor

@bors bors commented on 180d050 Aug 5, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 29099e4

Please sign in to comment.