windows complete completion

This commit is contained in:
Pere Diaz Bou
2024-11-07 09:57:24 +01:00
parent 2514287263
commit 0d857661f2

View File

@@ -80,12 +80,14 @@ impl File for WindowsFile {
let buf = buffer.borrow();
let buf = buf.as_slice();
file.write_all(buf)?;
c.complete(buffer.borrow().len() as i32);
Ok(())
}
fn sync(&self, c: Rc<Completion>) -> Result<()> {
let mut file = self.file.borrow_mut();
file.sync_all().map_err(|err| LimboError::IOError(err))?;
c.complete(0);
Ok(())
}
}