Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Skip unusable friend shares during cache warm-up

Anand Baburajanc4218b85b31f
diff --git a/rust/space/src/client/mod.rs b/rust/space/src/client/mod.rs
index b971e7e896..7174d2fe84 100644
--- a/rust/space/src/client/mod.rs
+++ b/rust/space/src/client/mod.rs
@@ -583,7 +583,15 @@ impl AccountSpaceCtx {
let shares = self.list_friend_shares(space_id).await?;
let mut value = Vec::with_capacity(shares.len());
for share in shares {
- value.push(self.decrypt_friend_share(space_id, &share).await?);
+ match self.decrypt_friend_share(space_id, &share).await {
+ Ok(share) => value.push(share),
+ Err(
+ SpaceError::Crypto(_)
+ | SpaceError::InvalidInput(_)
+ | SpaceError::MissingFriendSealedSpaceKey,
+ ) => {}
+ Err(error) => return Err(error),
+ }
}
cache_lock(&self.friend_shares_cache, "friend shares")?
.insert(space_id.to_owned(), value.clone());