Skip to content

Commit

Permalink
Fix: Check for clean prefix hides access errors
Browse files Browse the repository at this point in the history
  • Loading branch information
paraseba committed Feb 21, 2025
1 parent 426806b commit 6f0fae2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion icechunk/src/storage/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,11 @@ pub trait Storage: fmt::Debug + private::Sealed + Sync + Send {
) -> StorageResult<DateTime<Utc>>;

async fn root_is_clean(&self) -> StorageResult<bool> {
Ok(self.list_objects(&Settings::default(), "").await?.next().await.is_none())
match self.list_objects(&Settings::default(), "").await?.next().await {
None => Ok(true),
Some(Ok(_)) => Ok(false),
Some(Err(err)) => Err(err),
}
}

async fn list_chunks(
Expand Down

0 comments on commit 6f0fae2

Please sign in to comment.