Xuanwo commented on code in PR #4878:
URL: https://github.com/apache/opendal/pull/4878#discussion_r1673350575
##########
core/src/services/compfs/writer.rs:
##########
@@ -50,9 +56,20 @@ impl oio::Write for CompfsWriter {
}
async fn close(&mut self) -> Result<()> {
- let f = self.file.clone();
+ let f = self
+ .file
+ .clone()
+ .ok_or_else(|| Error::new(ErrorKind::Unexpected, "file has been
closed"))?;
self.core
.exec(move || async move { f.get_ref().sync_all().await })
+ .await?;
+
+ let f = self
+ .file
+ .clone()
+ .ok_or_else(|| Error::new(ErrorKind::Unexpected, "file has been
closed"))?;
+ self.core
Review Comment:
I'm not sure if this right..
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]