Created
December 11, 2009 12:01
-
-
Save jsamsa/254166 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/swank/util/class_browse.clj b/src/swank/util/class_browse.clj | |
index 449df6e..8d6cfbc 100644 | |
--- a/src/swank/util/class_browse.clj | |
+++ b/src/swank/util/class_browse.clj | |
@@ -22,7 +22,8 @@ | |
:file Path of the class file, relative to :loc" | |
(:import [java.io File FilenameFilter] | |
[java.util StringTokenizer] | |
- [java.util.jar JarFile JarEntry])) | |
+ [java.util.jar JarFile JarEntry] | |
+ [java.util.regex Pattern])) | |
;;; Class file naming, categorization | |
@@ -88,7 +89,7 @@ | |
;; location. Make sure it decends; a class can't be on classpath directly. | |
[#^File f #^File loc] | |
(let [fp (.getPath f), lp (.getPath loc) | |
- m (re-matcher (re-pattern (str "^" lp File/separator)) fp)] | |
+ m (re-matcher (re-pattern (Pattern/quote (str "^" lp File/separator))) fp)] | |
(if (not (.find m)) ; must be descendent of loc | |
[] | |
(let [fpr (.substring fp (.end m))] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment