~nytpu/gemini-try-files

047ced5b54dadfcefe2201de6ce9c595ae382b1e — nytpu 8 months ago d7c32ef
fix bug
1 files changed, 9 insertions(+), 9 deletions(-)

M src/gtf.lisp
M src/gtf.lisp => src/gtf.lisp +9 -9
@@ 124,15 124,15 @@ size.")
                      (return nil))))

                 ((and (consp (car test))
                       (eq :with-ext (caar test))
                       (/= 0 (length path))
                       (char/= #\/ (char path (1- (length path)))))
                  (let ((filename (uiop:merge-pathnames*
                                    (uiop:parse-unix-namestring (uiop:strcat path "." (cadar test)))
                                    (cdr test))))
                    (when (uiop:file-exists-p filename)
                      (return-file req filename)
                      (return nil))))
                       (eq :with-ext (caar test)))
                  (when (and (/= 0 (length path))
                             (char/= #\/ (char path (1- (length path)))))
                    (let ((filename (uiop:merge-pathnames*
                                      (uiop:parse-unix-namestring (uiop:strcat path "." (cadar test)))
                                      (cdr test))))
                      (when (uiop:file-exists-p filename)
                        (return-file req filename)
                        (return nil)))))

                 (t (error "Invalid test: ~s" test)))