File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -149,7 +149,14 @@ pub trait FileExt {
149
149
/// Note that similar to [`File::write`], it is not an error to return a
150
150
/// short write.
151
151
///
152
+ /// # Bug
153
+ /// On some systems, due to a [bug] with [`pwrite64`] (the underlying
154
+ /// syscall), files opened with the `O_APPEND` flag fail to respect the
155
+ /// offset parameter, always appending to the end of the file instead.
156
+ ///
152
157
/// [`File::write`]: fs::File::write
158
+ /// [`pwrite64`]: https://man7.org/linux/man-pages/man2/pwrite.2.html
159
+ /// [bug]: https://man7.org/linux/man-pages/man2/pwrite.2.html#BUGS
153
160
///
154
161
/// # Examples
155
162
///
@@ -159,7 +166,7 @@ pub trait FileExt {
159
166
/// use std::os::unix::prelude::FileExt;
160
167
///
161
168
/// fn main() -> io::Result<()> {
162
- /// let file = File::open ("foo.txt")?;
169
+ /// let file = File::create ("foo.txt")?;
163
170
///
164
171
/// // We now write at the offset 10.
165
172
/// file.write_at(b"sushi", 10)?;
You can’t perform that action at this time.
0 commit comments