Skip to content

Commit

Permalink
Fixes issue #555
Browse files Browse the repository at this point in the history
This modifies the file-filter function so that if the criteria seq is
empty, it throws an error.
  • Loading branch information
Daniel Manila committed Jun 16, 2017
1 parent 743eb05 commit de783e4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions boot/core/src/boot/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -1218,6 +1218,7 @@
"A file filtering function factory. FIXME: more documenting here."
[mkpred]
(fn [criteria files & [negate?]]
(assert (seq criteria) "file-filet (called from by-*) requires a list of matching paths, if you want all files use boot.core/ls")
(let [tmp? (partial satisfies? tmpd/ITmpFile)
->file #(if (tmp? %) (io/file (tmp-path %)) (io/file %))
pred (apply juxt (mapv mkpred criteria))]
Expand Down

0 comments on commit de783e4

Please sign in to comment.