From c7d8057d5cbfa5a0f44a6c5c03edfa543d0d7f6c Mon Sep 17 00:00:00 2001 From: Kimmo Koskinen Date: Thu, 10 Oct 2013 12:43:43 +0300 Subject: [PATCH] Handle case-sensitivity, fixes #240 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() --- support/src/cljsbuild/compiler.clj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/support/src/cljsbuild/compiler.clj b/support/src/cljsbuild/compiler.clj index 11aa2731..134199dc 100644 --- a/support/src/cljsbuild/compiler.clj +++ b/support/src/cljsbuild/compiler.clj @@ -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)))