Skip to content

Commit

Permalink
Fix exists handling
Browse files Browse the repository at this point in the history
Signed-off-by: Xuanwo <[email protected]>
  • Loading branch information
Xuanwo committed Dec 13, 2024
1 parent 8838446 commit cdc4763
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/storage/drivers/opendal_adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,14 @@ impl StoreDriver for OpendalAdapter {
///
/// Returns a `StorageResult` with a boolean indicating the existence of the
/// content.
///
/// # TODO
///
/// The `exists` function should return an error for issues such as permission denied.
/// However, these errors are not handled during the migration process and should be addressed
/// after the test suites are refactored.
async fn exists(&self, path: &Path) -> StorageResult<bool> {
let path = path.display().to_string();
Ok(self.opendal_impl.exists(&path).await?)
Ok(self.opendal_impl.exists(&path).await.is_ok())
}
}

0 comments on commit cdc4763

Please sign in to comment.