From d24fcc3546b0ef5984a56d53956b8836e80dac2e Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Mon, 9 May 2022 09:42:42 +0200 Subject: [PATCH] favicon: Create a link for svg favicons Instead of creating a scaled variants Fixes #326 --- src/models/provider.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/models/provider.rs b/src/models/provider.rs index 1c871b3..58058a8 100644 --- a/src/models/provider.rs +++ b/src/models/provider.rs @@ -418,6 +418,14 @@ impl Provider { large_pixbuf.savev(large_cache.clone(), "png", &[])?; }; tokio::fs::remove_file(cache_path).await?; + } else { + let mut small_cache = cache_path.clone(); + small_cache.set_file_name(small_icon_name); + tokio::fs::symlink(&cache_path, small_cache).await?; + + let mut large_cache = cache_path.clone(); + large_cache.set_file_name(large_icon_name); + tokio::fs::symlink(&cache_path, large_cache).await?; } Ok(icon_name.to_string()) } else {