Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save dethstryke/1099572 to your computer and use it in GitHub Desktop.

Select an option

Save dethstryke/1099572 to your computer and use it in GitHub Desktop.
Fixed-unoptimized-compile-in-windows
From da861a9ec95879f06c36fc5373793835e02cd482 Mon Sep 17 00:00:00 2001
From: Troy Clevenger <troy.clevenger@gmail.com>
Date: Thu, 21 Jul 2011 15:48:38 -0400
Subject: [PATCH] Fixed unoptimized compile in windows.
---
src/clj/cljs/closure.clj | 2 +-
src/clj/cljs/compiler.clj | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/clj/cljs/closure.clj b/src/clj/cljs/closure.clj
index 7f837c0..0099c59 100644
--- a/src/clj/cljs/closure.clj
+++ b/src/clj/cljs/closure.clj
@@ -568,7 +568,7 @@
(defn path-relative-to
"Generate a string which is the path to input relative to base."
[^File base input]
- (let [base-path (comp/path-seq (.getCanonicalPath base))
+ (let [base-path (comp/path-seq (.getFile ^URL (.toURL base)))
input-path (comp/path-seq (.getFile ^URL (-url input)))
count-base (count base-path)
common (count (take-while true? (map #(= %1 %2) base-path input-path)))
diff --git a/src/clj/cljs/compiler.clj b/src/clj/cljs/compiler.clj
index b1f2213..ba389b7 100644
--- a/src/clj/cljs/compiler.clj
+++ b/src/clj/cljs/compiler.clj
@@ -1093,11 +1093,11 @@ goog.require = function(rule){Packages.clojure.lang.RT[\"var\"](\"cljs.compiler\
(defn path-seq
[file-str]
- (string/split file-str (re-pattern java.io.File/separator)))
+ (string/split file-str (re-pattern "/" )))
(defn to-path
[parts]
- (apply str (interpose java.io.File/separator parts)))
+ (apply str (interpose "/" parts)))
(defn to-target-file
"Given the source root directory, the output target directory and
--
1.7.4.msysgit.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment