Commit 52b174e1 authored by Clint Rogers's avatar Clint Rogers

Works around a problem in glib where two on-disk directories could have...

Works around a problem in glib where two on-disk directories could have different filenames that collated to the same collation key; fixes #6825.
parent e03e0932
...@@ -32,7 +32,17 @@ public class Folders.Branch : Sidebar.Branch { ...@@ -32,7 +32,17 @@ public class Folders.Branch : Sidebar.Branch {
if (a == b) if (a == b)
return 0; return 0;
return strcmp(((Folders.SidebarEntry) a).collation, ((Folders.SidebarEntry) b).collation); int coll_key_equality = strcmp(((Folders.SidebarEntry) a).collation,
((Folders.SidebarEntry) b).collation);
if (coll_key_equality == 0) {
// Collation keys were the same, double-check that
// these really are the same string...
return strcmp(((Folders.SidebarEntry) a).get_sidebar_name(),
((Folders.SidebarEntry) b).get_sidebar_name());
}
return coll_key_equality;
} }
private void on_media_contents_altered(Gee.Iterable<DataObject>? added, Gee.Iterable<DataObject>? removed) { private void on_media_contents_altered(Gee.Iterable<DataObject>? added, Gee.Iterable<DataObject>? removed) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment