From a16b6f08f503363eda666c5906dd7fda5388f064 Mon Sep 17 00:00:00 2001 From: Julien Osman <33510663+jershon@users.noreply.github.com> Date: Wed, 24 Oct 2018 21:57:56 +0200 Subject: [PATCH] Add a sorting lambda function when sorting the backups list (#562) * Add a sorting lambda function when sorting the backups list * Update backup.py --- src/yunohost/backup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/yunohost/backup.py b/src/yunohost/backup.py index 0749312d3..6ef9a0554 100644 --- a/src/yunohost/backup.py +++ b/src/yunohost/backup.py @@ -2187,7 +2187,7 @@ def backup_list(with_info=False, human_readable=False): except ValueError: continue result.append(name) - result.sort() + result.sort(key=lambda x: os.path.getctime(os.path.join(ARCHIVES_PATH, x+".tar.gz"))) if result and with_info: d = OrderedDict()