Fix filename matching when no match is found.

This commit is contained in:
Dimitri Fontaine 2014-04-29 14:49:55 +02:00
parent f5f584fdf1
commit f0cc4ddef9

View File

@ -165,7 +165,7 @@
against the given regexp."
(let* ((candidates (pgloader.archive:get-matching-filenames root regex))
(candidates (ecase keep
(:first (list (first candidates)))
(:first (when candidates (list (first candidates))))
(:all candidates))))
(unless candidates
(error "No file matching '~a' in expanded archive in '~a'" regex root))