Permalink
Browse files

CLJS-694: Remove dependency on Java 7 nio api. EOM

  • Loading branch information...
1 parent 5627d4e commit 023b49280a347979548cecc9b555f717b65b884f @timvisher timvisher committed with swannodette Nov 21, 2013
Showing with 9 additions and 10 deletions.
  1. +2 −2 src/clj/cljs/closure.clj
  2. +7 −8 src/clj/cljs/source_map.clj
@@ -987,8 +987,8 @@
(defn same-or-subdirectory-of? [dir path]
"Checks that path names a file or directory that is the dir or a subdirectory there of."
- (let [dir-path (.toAbsolutePath (.toPath (io/file dir)))
- path-path (.toAbsolutePath (.toPath (io/file path)))]
+ (let [dir-path (.getAbsolutePath (io/file dir))
+ path-path (.getAbsolutePath (io/file path))]
(.startsWith path-path dir-path)))
(defn check-output-to [{:keys [output-to] :as opts}]
@@ -163,16 +163,15 @@
bare-munged-path
:default
- (let [unrelativized-jpath (-> bare-munged-path
+ (let [unrelativized-juri (-> bare-munged-path
io/file
- .toPath
- .toAbsolutePath)
- source-map-parent-jpath (-> source-map
+ .toURI)
+ source-map-parent-juri (-> source-map
io/file
- .toPath
- .toAbsolutePath
- .getParent)]
- (str (.relativize source-map-parent-jpath unrelativized-jpath))))))
+ .getAbsoluteFile
+ .getParentFile
+ .toURI)]
+ (str (.relativize source-map-parent-juri unrelativized-juri))))))
(defn encode
"Take an internal source map representation represented as nested

0 comments on commit 023b492

Please sign in to comment.