fix: return empty vec
This commit is contained in:
parent
a29ed8c1c8
commit
38e7895b71
@ -8,6 +8,9 @@ pub async fn read_certs(
|
||||
ca: &PublicKey,
|
||||
path: impl AsRef<Path>,
|
||||
) -> anyhow::Result<Vec<Certificate>> {
|
||||
if !path.as_ref().exists() {
|
||||
return Ok(Vec::new());
|
||||
}
|
||||
read_dir(path.as_ref().join(ca_dir(ca))).await
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user