diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2023-11-20 18:25:49 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2023-11-20 18:25:49 +0100 |
commit | 394326a81d1248bbc5b1a35a8ae623c65ef6a9ea (patch) | |
tree | 315f7cf2a7934b0ecf45ac2caa3c87949a90dfc4 /src/ThumbnailCache.vala | |
parent | 918f560d56129ed03f19d843ea2efd7cb4b23821 (diff) | |
parent | 87ba373882f475f02a524a120b59ea9fcccf14e5 (diff) |
Update upstream source from tag 'upstream/0.32.3'
Update to upstream version '0.32.3'
with Debian dir e5e2a77e8650a79f6e85cccb15c070434b0fd667
Diffstat (limited to 'src/ThumbnailCache.vala')
-rw-r--r-- | src/ThumbnailCache.vala | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/ThumbnailCache.vala b/src/ThumbnailCache.vala index 5585708..2664cf3 100644 --- a/src/ThumbnailCache.vala +++ b/src/ThumbnailCache.vala @@ -509,13 +509,26 @@ public class ThumbnailCache : Object { File src_file = get_source_cached_file(src_source); File dest_file = get_cached_file(dest_source.get_representative_id(), src_source.get_preferred_thumbnail_format()); + bool success = false; try { src_file.copy(dest_file, FileCopyFlags.ALL_METADATA | FileCopyFlags.OVERWRITE, null, null); + success = true; } catch (Error err) { - AppWindow.panic("%s".printf(err.message)); + debug("Failed to duplicate thumbnail: %s", err.message); } - + + if (success) { + return; + } + + try { + _import_from_source(dest_source, true); + _import_from_source(src_source, false); + } catch (Error err) { + debug("Failed to duplicate thumbnail: %s", err.message); + } + // Do NOT store in memory cache, for similar reasons as stated in _import(). } |