diff options
author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2009-11-26 14:39:12 +0100 |
---|---|---|
committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2009-11-26 14:39:43 +0100 |
commit | 5c5cb472204ea08f971c48168644fc3dfc41cdaa (patch) | |
tree | 038b350455d2f47f4c7a541bee99cae104f0f821 /logikorr.lisp | |
parent | ad442c66a7a1304b219e518289f9e0051d0d31c5 (diff) |
Choose the current data file by name, not by file modification date.
Diffstat (limited to 'logikorr.lisp')
-rw-r--r-- | logikorr.lisp | 6 |
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) |