Skip to content

Commit

Permalink
Handle case-sensitivity, fixes #240
Browse files Browse the repository at this point in the history
The result of fs/absolute-path might differ in case. Result of
getCanonicalPath is defined to "be both absolute and unique" [1]. As
noted by Chas, in #240, this probably is an incremental solution only.

[1] http://docs.oracle.com/javase/7/docs/api/java/io/File.html#getCanonicalPath()
  • Loading branch information
Kimmo Koskinen committed Oct 10, 2013
1 parent 266ff01 commit c7d8057
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions support/src/cljsbuild/compiler.clj
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@
path)))

(defn- relativize [parent path]
(let [path (fs/absolute-path path)
parent (fs/absolute-path parent)]
(let [path (.getCanonicalPath (fs/file path))
parent (.getCanonicalPath (fs/file parent))]
(if (.startsWith path parent)
(subs path (count parent))
path)))
Expand Down

0 comments on commit c7d8057

Please sign in to comment.