diff --git a/crev-lib/src/local.rs b/crev-lib/src/local.rs index 39feb95f..809cf827 100644 --- a/crev-lib/src/local.rs +++ b/crev-lib/src/local.rs @@ -259,8 +259,11 @@ impl Local { let ids_path = self.user_ids_path(); let mut ids = vec![]; for dir_entry in std::fs::read_dir(&ids_path)? { - let locked_id = LockedId::read_from_yaml_file(&dir_entry?.path())?; - ids.push(locked_id.to_public_id()) + let path = dir_entry?.path(); + if path.extension().map_or(false, |ext| ext == "yaml") { + let locked_id = LockedId::read_from_yaml_file(&path)?; + ids.push(locked_id.to_public_id()) + } } Ok(ids)