From 33f41e8566d164f9c95b3ef56a7c570e0c2cf118 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Galkin?= Date: Fri, 21 Feb 2025 13:50:55 -0300 Subject: [PATCH] Fix: Check for clean prefix hides access errors (#766) --- icechunk/src/storage/mod.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/icechunk/src/storage/mod.rs b/icechunk/src/storage/mod.rs index 28768818..a7d84e6f 100644 --- a/icechunk/src/storage/mod.rs +++ b/icechunk/src/storage/mod.rs @@ -406,7 +406,11 @@ pub trait Storage: fmt::Debug + private::Sealed + Sync + Send { ) -> StorageResult>; async fn root_is_clean(&self) -> StorageResult { - 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(