From e0806a2c94e7cc8dbb3c01d52eb3331ad77627ec Mon Sep 17 00:00:00 2001 From: Joshua Coles Date: Thu, 25 Apr 2024 14:14:52 +0100 Subject: [PATCH] Filter for only gzip files, this should be done better --- src/main.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.rs b/src/main.rs index 40bf71f..cc0a557 100644 --- a/src/main.rs +++ b/src/main.rs @@ -70,6 +70,7 @@ struct Place { fn hash_files(files: ReadDir) -> impl Iterator { files.into_iter() .map(|f| f.unwrap().path()) + .filter_map(|p| p.extension().and_then(|ext| ext.to_str()).filter(|p| p == "gz")) .map(|path| { let date = { let file_name = path.file_name().unwrap().to_str().unwrap();