Skip to content

Commit 24bd812

Browse files
committed
libnative/io: datasync() wrongly called fsync().
1 parent c669411 commit 24bd812

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libnative/io/file_unix.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ impl rtio::RtioFileStream for CFile {
303303
self.flush().and_then(|()| self.fd.fsync())
304304
}
305305
fn datasync(&mut self) -> IoResult<()> {
306-
self.flush().and_then(|()| self.fd.fsync())
306+
self.flush().and_then(|()| self.fd.datasync())
307307
}
308308
fn truncate(&mut self, offset: i64) -> IoResult<()> {
309309
self.flush().and_then(|()| self.fd.truncate(offset))

0 commit comments

Comments
 (0)