From 5c5cb472204ea08f971c48168644fc3dfc41cdaa Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Thu, 26 Nov 2009 14:39:12 +0100 Subject: Choose the current data file by name, not by file modification date. --- logikorr.lisp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'logikorr.lisp') diff --git a/logikorr.lisp b/logikorr.lisp index ddf4fbd..c272880 100644 --- a/logikorr.lisp +++ b/logikorr.lisp @@ -27,8 +27,10 @@ (defun find-and-initialise-database () (let* ((files (directory (merge-pathnames #p"*.txt" *database-directory*))) - (files-by-write-date (sort files #'> :key #'file-write-date))) - (setq *database* (first files-by-write-date)))) + (sorted-files (sort files #'> + :key (lambda (x) + (parse-integer (pathname-name x)))))) + (setq *database* (first sorted-files)))) (defun make-new-revision () (find-and-initialise-database) -- cgit v1.2.3