aboutsummaryrefslogtreecommitdiffstats
path: root/fileset.c
diff options
context:
space:
mode:
Diffstat (limited to 'fileset.c')
-rw-r--r--fileset.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fileset.c b/fileset.c
index 8e4397ea6f..b7d71d5471 100644
--- a/fileset.c
+++ b/fileset.c
@@ -212,14 +212,14 @@ fileset_add_file(const char *dirname, const char *fname, gboolean current)
}
-/* compare two list entries by creation date/time */
+/* compare two list entries by creation date/time (through filename) */
static gint
-fileset_compare_creation(gconstpointer a, gconstpointer b)
+fileset_sort_compare(gconstpointer a, gconstpointer b)
{
const fileset_entry *entry_a = a;
const fileset_entry *entry_b = b;
- return entry_a->ctime - entry_b->ctime;
+ return strcmp(entry_a->name, entry_b->name);
}
@@ -304,7 +304,7 @@ fileset_add_dir(const char *fname)
g_string_free(dirname, TRUE /* free_segment */);
/* sort entries by creation time */
- set.entries = g_list_sort(set.entries, fileset_compare_creation);
+ set.entries = g_list_sort(set.entries, fileset_sort_compare);
fileset_update_dlg();
}