From 13cba9b0be736433d8ac44c0ef046cb001918a07 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 7 Nov 2026 22:35:09 +0100 Subject: store: keys_at tells no map from an empty one registry::exists counted any value at _continuum/users as a registry; keys_at answers None where there is no map, and its users (records, members, forget records, remakes) say what they make of it. Auth plan M1 (fix). --- src/remake/records.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/remake/records.rs') diff --git a/src/remake/records.rs b/src/remake/records.rs index 0c4c444..21b383c 100644 --- a/src/remake/records.rs +++ b/src/remake/records.rs @@ -360,6 +360,8 @@ pub(crate) fn load(doc: &impl ReadDoc, id: &str) -> Option { pub(crate) fn load_all(doc: &impl ReadDoc) -> Vec<(String, Record)> { let register = load_register(doc); store::keys_at(doc, &records_dir()) + .ok() + .flatten() .unwrap_or_default() .into_iter() .filter_map(|id| { @@ -434,6 +436,8 @@ fn register_path(voter: &str) -> Vec { /// The votes register; unreadable entries are skipped with a warning. pub(crate) fn load_register(doc: &impl ReadDoc) -> Register { store::keys_at(doc, &meta::path(&[VOTES])) + .ok() + .flatten() .unwrap_or_default() .into_iter() .filter_map(|voter| { -- cgit v1.3.1