]> git.lizzy.rs Git - rust.git/commit
Auto merge of #26642 - remram44:doc-openoptions-missing-write, r=alexcrichton
authorbors <bors@rust-lang.org>
Sun, 28 Jun 2015 21:37:07 +0000 (21:37 +0000)
committerbors <bors@rust-lang.org>
Sun, 28 Jun 2015 21:37:07 +0000 (21:37 +0000)
commit2671e8cee08eb35013dc211286a6765c80b49c29
tree9051912dcb0a37cb566c5cc5a733ce08fb660376
parentc1b8bd2d6fd4a00522635112d3f7b28501552a65
parent78ec055a148008b6ef9c01ce6fda3c8e6448113d
Auto merge of #26642 - remram44:doc-openoptions-missing-write, r=alexcrichton

Setting append without write doesn't give you a writeable file. Showing it as an example in the docs is confusing at best ([reddit](https://www.reddit.com/r/rust/comments/3bbz8w/why_is_writing_a_file_not_working_for_me/))

Using truncate (O_TRUNC) on a read-only file is an error on POSIX systems ("unspecified"). Note however that using create (O_CREAT) with read-only flags is fine.

Related: #26103 (which IMHO is wrong; saying "append is different than write" when should simply be "append needs write". My vote is to make append imply write)