            (reduce #(tmpd/add %1 dir %2 nil) fileset)))))
 
 (defn- sift-filter
+  "Similar to filter, where match? is a predicate with signature [path tmpfile]."
   [match?]
-  (let [reducer (fn [xs k v] (if-not (match? k) xs (assoc xs k v)))]
+  (let [reducer (fn [xs k v] (if-not (match? k v) xs (assoc xs k v)))]
     (fn [fileset] (->> (partial reduce-kv reducer {})
-                       (update-in fileset [:tree])))))
+                      (update-in fileset [:tree])))))
 
 (defn- jar-path
   [sym]


(defn- sift-match
  [invert? regexes]
  (->> (map #(partial re-find %) regexes)
       (apply some-fn)
       (comp (if invert? not identity))))

(defn- sift-meta
  [invert? kws]
  (->> (map #(fn [x] (contains? (meta x) %)) kws)
       (apply some-fn)
       (comp (if invert? not identity))))

(defn- sift-mv
  [rolekey invert? optargs]

    (let [match?  (sift-match invert? optargs)
          dir     (#'core/get-add-dir fileset #{rolekey})
          reducer (fn [xs k v]
                    (->> (if-not (match? k v) v (assoc v :dir dir))
                         (assoc xs k)))]
      (->> (partial reduce-kv reducer {})
           (update-in fileset [:tree])))))
