Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Finally fix that bloody symlink issue.

  • Loading branch information...
commit 4e6a2353302d3d7b6d1a20764d326712e8d93651 1 parent 50659f5
@Raynes Raynes authored
Showing with 7 additions and 4 deletions.
  1. +1 −1  project.clj
  2. +6 −3 src/bultitude/core.clj
View
2  project.clj
@@ -1,4 +1,4 @@
-(defproject bultitude "0.1.4"
+(defproject bultitude "0.1.5"
:min-lein-version "2.0.0"
:description "A library for find Clojure namespaces on the classpath."
:dependencies [[org.clojure/clojure "1.2.1"]]
View
9 src/bultitude/core.clj
@@ -7,7 +7,8 @@
(defn- clj? [f]
;; Needs to work on JarEntries and Files, the former of which has no .isFile
- (and (not (.isDirectory f)) (.endsWith (.getName f) ".clj")))
+ (and (not (.isDirectory f))
+ (.endsWith (.getName f) ".clj")))
(defn- jar? [f]
(and (.isFile f) (.endsWith (.getName f) ".jar")))
@@ -31,7 +32,7 @@
"Return a seq of all namespaces found in Clojure source files in dir."
[dir]
(for [f (file-seq (io/file dir))
- :when (clj? f)
+ :when (and (clj? f) (.canRead f))
:let [ns-form (read-ns-form (PushbackReader. (io/reader f)))]
:when ns-form]
ns-form))
@@ -109,7 +110,9 @@
[& {:keys [prefix classpath] :or {classpath (classpath-files)}}]
(mapcat
(partial file->namespaces prefix)
- (->> classpath classpath->collection classpath->files (filter #(.canRead %)))))
+ (->> classpath
+ classpath->collection
+ classpath->files)))
(defn path-for
"Transform a namespace into a .clj file path relative to classpath root."
Please sign in to comment.
Something went wrong with that request. Please try again.