fix: return empty vec

This commit is contained in:
shimun 2022-12-01 13:58:56 +00:00
parent a29ed8c1c8
commit 38e7895b71

View File

@ -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
}