diff --git a/src/cryogen_core/classpath_able_io/fs.clj b/src/cryogen_core/classpath_able_io/fs.clj index 90dd92f..a546ce9 100644 --- a/src/cryogen_core/classpath_able_io/fs.clj +++ b/src/cryogen_core/classpath_able_io/fs.clj @@ -7,7 +7,7 @@ ; You must not remove this notice, or any other, from this software. (ns cryogen-core.classpath-able-io.fs - (:require [cryogen-core.classpath-able-io.this :as type]) + (:require [cryogen-core.classpath-able-io.this :as this]) (:import [java.net URI] [java.nio.file Paths Files LinkOption])) @@ -29,7 +29,14 @@ (defn path-if-exists [& path-elements] - (let [path-from-fs (Paths/get (URI. (str "file://" (apply absolut-path path-elements))))] + (let [path-from-fs + (Paths/get + (URI. (str "file://" + (apply absolut-path + ;TODO: sollte hier nicht auch stehen: + ;(apply this/virtual-path-from-elements path-elements) + path-elements + ))))] (when (Files/exists path-from-fs follow-link-option) path-from-fs))) @@ -76,9 +83,9 @@ [resource-to-work-with])] (cond (nil? resource-to-work-with) (recur (drop 1 paths) result) - (type/is-file? resource-to-work-with) + (this/is-file? resource-to-work-with) (recur (drop 1 paths) result) - (type/is-dir? resource-to-work-with) + (this/is-dir? resource-to-work-with) (recur (into (drop 1 paths) (map #(str path-to-work-with "/" %) (list-entries-for-dir resource-to-work-with))) diff --git a/src/cryogen_core/classpath_able_io/jar.clj b/src/cryogen_core/classpath_able_io/jar.clj index 4f5eb33..3b082ed 100644 --- a/src/cryogen_core/classpath_able_io/jar.clj +++ b/src/cryogen_core/classpath_able_io/jar.clj @@ -57,9 +57,7 @@ (try (let [resource-uri (.toURI (io/resource - (st/join "/" - (filter #(not (empty? %)) - path-elements))))] + (apply this/virtual-path-from-elements path-elements)))] (when (is-from-classpath-jar? resource-uri) (do (init-file-system resource-uri)