summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--logikorr.lisp6
1 files changed, 4 insertions, 2 deletions
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)