Check :target-path before writing stale file. Fixes #589.

This commit is contained in:
Phil Hagelberg 2012-05-18 08:52:23 -07:00
parent 6d66921151
commit a9c2f9effe

View file

@ -54,7 +54,7 @@
(str/join "+" (map name keys)))
current-value (pr-str (map (juxt identity project) keys))
old-value (and (.exists file) (slurp file))]
(when (not= current-value old-value)
(when (and (:target-path project) (not= current-value old-value))
(apply f args)
(.mkdirs (.getParentFile file))
(spit file (doall current-value)))))