Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
@@ -8,7 +8,7 @@ use std::{
|
||||
|
||||
pub mod extensions;
|
||||
|
||||
use anyhow::anyhow;
|
||||
use anyhow::{anyhow, Context};
|
||||
|
||||
impl FileReader {
|
||||
pub fn new() -> Self {
|
||||
@@ -20,7 +20,9 @@ impl FileReader {
|
||||
|
||||
let mut clusters: BTreeMap<String, Vec<File>> = BTreeMap::new();
|
||||
|
||||
let mut dir = tokio::fs::read_dir(&location).await?;
|
||||
let mut dir = tokio::fs::read_dir(&location)
|
||||
.await
|
||||
.context(format!("failed to find location: {}", &location.display()))?;
|
||||
while let Some(dir_entry) = dir.next_entry().await? {
|
||||
if dir_entry.metadata().await?.is_dir() {
|
||||
tracing::trace!("found cluster in: {}", dir_entry.path().display());
|
||||
|
||||
Reference in New Issue
Block a user