From c6d63f7507b9371984f4e450ad583a9931a0daf8 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Mon, 7 Jun 2010 23:24:30 +0200 Subject: [PATCH] Clean up files with identical timestamps in ascending name order --- cleanup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cleanup.c b/cleanup.c index 97f9f8ecc..f38ccbca2 100644 --- a/cleanup.c +++ b/cleanup.c @@ -71,11 +71,11 @@ static int is_object_file(const char *fname) return 1; } -/* file comparison function to try to delete the oldest files first */ +/* File comparison function that orders files in mtime order, oldest first. */ static int files_compare(struct files **f1, struct files **f2) { if ((*f2)->mtime == (*f1)->mtime) { - return strcmp((*f2)->fname, (*f1)->fname); + return strcmp((*f1)->fname, (*f2)->fname); } if ((*f2)->mtime > (*f1)->mtime) { return -1; -- 2.47.3