summaryrefslogtreecommitdiff
path: root/logikorr.lisp
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2009-11-26 14:39:12 +0100
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2009-11-26 14:39:43 +0100
commit5c5cb472204ea08f971c48168644fc3dfc41cdaa (patch)
tree038b350455d2f47f4c7a541bee99cae104f0f821 /logikorr.lisp
parentad442c66a7a1304b219e518289f9e0051d0d31c5 (diff)
Choose the current data file by name, not by file modification date.
Diffstat (limited to 'logikorr.lisp')
-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)