From 771233176fd108e0537c5dc5456c5c09cd8d1ef8 Mon Sep 17 00:00:00 2001 From: James Hurst Date: Mon, 9 Nov 2020 21:50:35 -0500 Subject: [PATCH] Fix for negcached icons --- src/api/icons.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/api/icons.rs b/src/api/icons.rs index f1916c3c..f4e4edf7 100644 --- a/src/api/icons.rs +++ b/src/api/icons.rs @@ -191,6 +191,11 @@ fn check_icon_domain_is_blacklisted(domain: &str) -> bool { fn get_icon(domain: &str) -> Option> { let path = format!("{}/{}.png", CONFIG.icon_cache_folder(), domain); + // Check for expiration of negatively cached copy + if icon_is_negcached(&path) { + return None; + } + if let Some(icon) = get_cached_icon(&path) { return Some(icon); } @@ -216,11 +221,6 @@ fn get_icon(domain: &str) -> Option> { } fn get_cached_icon(path: &str) -> Option> { - // Check for expiration of negatively cached copy - if icon_is_negcached(path) { - return None; - } - // Check for expiration of successfully cached copy if icon_is_expired(path) { return None;