From 1978a05a82191bc27dd950a41629733353fd30bf Mon Sep 17 00:00:00 2001 From: yggverse Date: Sat, 2 Aug 2025 10:20:13 +0300 Subject: [PATCH] handle images only --- src/main.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main.rs b/src/main.rs index 7cb470a..0892133 100644 --- a/src/main.rs +++ b/src/main.rs @@ -161,14 +161,6 @@ async fn main() -> Result<()> { } break; } - if preload.max_filesize.is_some_and(|limit| info.len > limit) { - if config.debug { - println!( - "\t\t\ttotal files size limit `{i}` reached!" - ) - } - break; - } if info.relative_filename.extension().is_none_or(|e| !matches!(e.as_bytes(), b"png" | b"jpeg" | b"jpg" | b"gif" | b"webp")) { if config.debug { @@ -179,6 +171,14 @@ async fn main() -> Result<()> { } continue; } + if preload.max_filesize.is_some_and(|limit| info.len > limit) { + if config.debug { + println!( + "\t\t\ttotal files size limit `{i}` reached!" + ) + } + continue; + } images.insert(info.relative_filename.clone(), info.len); assert!(update_only_files.insert(id)) }