Verify that parse-field returns an array.

Otherwise read-content fails to parse files with empty headers as it tries to aref nil
This commit is contained in:
Javier Olaechea 2014-08-19 15:01:51 -05:00
parent 81fe5a72d3
commit 3c62deaff2

View file

@ -59,6 +59,7 @@
(error "The provided file lacks the expected header.")) (error "The provided file lacks the expected header."))
(let ((meta (loop for line = (read-line in nil) (let ((meta (loop for line = (read-line in nil)
until (string= line (separator *config*)) until (string= line (separator *config*))
when (parse-field line)
appending (list (field-name line) appending (list (field-name line)
(aref (parse-field line) 0)))) (aref (parse-field line) 0))))
(filepath (enough-namestring file (repo *config*))) (filepath (enough-namestring file (repo *config*)))