Skip to content

Commit

Permalink
Escape classpath separators.
Browse files Browse the repository at this point in the history
  • Loading branch information
technomancy committed Nov 14, 2013
1 parent 9718597 commit 23b3477
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions leiningen-core/src/leiningen/core/classpath.clj
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,12 @@
project options))))

(defn- normalize-path [root path]
(let [f (io/file path)] ; http://tinyurl.com/ab5vtqf
(.getAbsolutePath (if (or (.isAbsolute f) (.startsWith (.getPath f) "\\"))
f (io/file root path)))))
(let [f (io/file path) ; http://tinyurl.com/ab5vtqf
abs (.getAbsolutePath (if (or (.isAbsolute f)
(.startsWith (.getPath f) "\\"))
f (io/file root path)))
sep (System/getProperty "path.separator")]
(str/replace abs sep (str "\\" sep))))

(defn ext-dependency?
"Should the given dependency be loaded in the extensions classloader?"
Expand Down

0 comments on commit 23b3477

Please sign in to comment.