diff --git a/boot/core/src/boot/core.clj b/boot/core/src/boot/core.clj index b46d0521..171783dc 100644 --- a/boot/core/src/boot/core.clj +++ b/boot/core/src/boot/core.clj @@ -1218,10 +1218,12 @@ "A file filtering function factory. FIXME: more documenting here." [mkpred] (fn [criteria files & [negate?]] - (let [tmp? (partial satisfies? tmpd/ITmpFile) - ->file #(if (tmp? %) (io/file (tmp-path %)) (io/file %)) - pred (apply juxt (mapv mkpred criteria))] - (filter-files #(pred (->file %)) files negate?)))) + (if (empty? criteria) + '() + (let [tmp? (partial satisfies? tmpd/ITmpFile) + ->file #(if (tmp? %) (io/file (tmp-path %)) (io/file %)) + pred (apply juxt (mapv mkpred criteria))] + (filter-files #(pred (->file %)) files negate?))))) (defn by-meta "This function takes two arguments: `preds` and `files`, where `preds` is a