From a9c2f9effe30bd714d1ccbe31d08152ef0051a89 Mon Sep 17 00:00:00 2001 From: Phil Hagelberg Date: Fri, 18 May 2012 08:52:23 -0700 Subject: [PATCH] Check :target-path before writing stale file. Fixes #589. --- leiningen-core/src/leiningen/core/classpath.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/leiningen-core/src/leiningen/core/classpath.clj b/leiningen-core/src/leiningen/core/classpath.clj index aca2abd8..081f02fe 100644 --- a/leiningen-core/src/leiningen/core/classpath.clj +++ b/leiningen-core/src/leiningen/core/classpath.clj @@ -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)))))