fix: log path

This commit is contained in:
shimun 2022-12-01 13:56:50 +00:00
parent c88c0f9542
commit a29ed8c1c8

View File

@ -15,7 +15,7 @@ pub async fn read_certs(
pub async fn read_dir(path: impl AsRef<Path> + Debug) -> anyhow::Result<Vec<Certificate>> { pub async fn read_dir(path: impl AsRef<Path> + Debug) -> anyhow::Result<Vec<Certificate>> {
let mut dir = fs::read_dir(path.as_ref()) let mut dir = fs::read_dir(path.as_ref())
.await .await
.context("read certs dir")?; .with_context(|| format!("read certs dir '{:?}'", path.as_ref()))?;
let mut certs = Vec::new(); let mut certs = Vec::new();
while let Some(entry) = dir.next_entry().await? { while let Some(entry) = dir.next_entry().await? {
//TODO: investigate why path().ends_with doesn't work //TODO: investigate why path().ends_with doesn't work