From 2c339a36f9a8ff15d427efd047656b6aeaf2ae35 Mon Sep 17 00:00:00 2001 From: Oliver Date: Thu, 9 Oct 2025 23:00:11 -0600 Subject: [PATCH] handle checking for file better --- src/filesystem.rs | 5 ++++- src/main.rs | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/filesystem.rs b/src/filesystem.rs index 3c57671..5ae4701 100644 --- a/src/filesystem.rs +++ b/src/filesystem.rs @@ -52,7 +52,10 @@ pub async fn check_file_length(file: &PathBuf) -> Option { } }, Err(err) => { - error!("Failed to open file for testing... {:?} {}", file, err); + match err.kind() { + ErrorKind::NotFound => {/* ignore */}, + _ => warn!("Failed to open file to check length. {:?} {}", file, err), + } }, } None diff --git a/src/main.rs b/src/main.rs index d5211e6..0ee7bc9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -246,6 +246,9 @@ async fn process(mut site: Website, db: Surreal, reqwest: reqwest::Clien if disk_len == len { skip_download = true; } + } else { + // File not found (or other error). + // Program will continue on it's way, downloading content. } } }