Enable thumbnail caching on all OSes

This commit is contained in:
Jeremy Soller 2025-07-10 15:20:06 -06:00
parent b44bef59c0
commit df070ddae1
No known key found for this signature in database
GPG key ID: 670FDFB5428E05CA

View file

@ -341,10 +341,8 @@ pub enum CachedThumbnail {
}
static THUMBNAIL_CACHE_BASE_DIR: Lazy<Option<PathBuf>> = Lazy::new(|| {
#[cfg(feature = "desktop")]
if let Ok(base_dirs) = xdg::BaseDirectories::new() {
let base_dir = base_dirs.get_cache_home().join("thumbnails");
return Some(base_dir);
if let Some(cache_dir) = dirs::cache_dir() {
return Some(cache_dir.join("thumbnails"));
}
log::warn!("failed to get thumbnail cache directory, thumbnails will not be cached");