Classpath optimizations - thanks @mbjarland
This commit is contained in:
parent
3f0cd93fc7
commit
6dc84315ac
1 changed files with 3 additions and 4 deletions
|
|
@ -19,8 +19,7 @@
|
||||||
(when (.exists f)
|
(when (.exists f)
|
||||||
(if url?
|
(if url?
|
||||||
;; manual conversion, faster than going through .toURI
|
;; manual conversion, faster than going through .toURI
|
||||||
(java.net.URL. (str "file:"
|
(java.net.URL. "file" nil (.getCanonicalPath f))
|
||||||
(.getCanonicalPath f)))
|
|
||||||
{:file (.getCanonicalPath f)
|
{:file (.getCanonicalPath f)
|
||||||
:source (slurp f)}))))
|
:source (slurp f)}))))
|
||||||
resource-paths)))
|
resource-paths)))
|
||||||
|
|
@ -32,8 +31,8 @@
|
||||||
(when-let [entry (.getEntry jar path)]
|
(when-let [entry (.getEntry jar path)]
|
||||||
(if url?
|
(if url?
|
||||||
;; manual conversion, faster than going through .toURI
|
;; manual conversion, faster than going through .toURI
|
||||||
(java.net.URL.
|
(java.net.URL. "jar" nil
|
||||||
(str "jar:file:" (.getCanonicalPath jar-file) "!/" path))
|
(str "file:" (.getCanonicalPath jar-file) "!/" path))
|
||||||
{:file path
|
{:file path
|
||||||
:source (slurp (.getInputStream jar entry))})))
|
:source (slurp (.getInputStream jar entry))})))
|
||||||
resource-paths)))
|
resource-paths)))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue