summaryrefslogtreecommitdiff
path: root/src/Thumbnail.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2023-11-24 08:37:53 +0100
committerJörg Frings-Fürst <debian@jff.email>2023-11-24 08:37:53 +0100
commit1bf62485f701b52ae27433e3570ac24cd7da886f (patch)
tree0f7be6ad3efd0c75fdad81d8bef5513d477f8d11 /src/Thumbnail.vala
parent008bc99860fd353a5da5d06e6be5937f4a358aed (diff)
parenta7f185a9852392d1d6290771db6289c97c401a36 (diff)
Merge branch 'release/debian/0.32.3-1'debian/0.32.3-1
Diffstat (limited to 'src/Thumbnail.vala')
-rw-r--r--src/Thumbnail.vala7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Thumbnail.vala b/src/Thumbnail.vala
index 51d2612..54fe361 100644
--- a/src/Thumbnail.vala
+++ b/src/Thumbnail.vala
@@ -194,6 +194,13 @@ public class Thumbnail : MediaSourceItem {
public static int64 filename_ascending_comparator(void *a, void *b) {
string path_a = ((Thumbnail *) a)->media.get_file().get_basename().down();
string path_b = ((Thumbnail *) b)->media.get_file().get_basename().down();
+ if (!path_a.validate()) {
+ path_a = Uri.escape_string(path_a, Uri.RESERVED_CHARS_ALLOWED_IN_PATH, true);
+ }
+
+ if (!path_b.validate()) {
+ path_b = Uri.escape_string(path_b, Uri.RESERVED_CHARS_ALLOWED_IN_PATH, true);
+ }
int64 result = strcmp(path_a.collate_key_for_filename(), path_b.collate_key_for_filename());
return (result != 0) ? result : photo_id_ascending_comparator(a, b);