Permalink
Browse files

c.c.io: fix backslash handling in file-str

  • Loading branch information...
1 parent 2cae517 commit c8be49609099ffca541f95b827a41179cbe83080 @stuartsierra stuartsierra committed Feb 11, 2010
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/main/clojure/clojure/contrib/io.clj
@@ -89,7 +89,8 @@
the path with the user.home system property."
[& args]
(let [#^String s (apply str args)
- s (.replaceAll (re-matcher #"[/\\]" s) File/separator)
+ s (.replace s \\ File/separatorChar)
+ s (.replace s \/ File/separatorChar)
s (if (.startsWith s "~")
(str (System/getProperty "user.home")
File/separator (subs s 1))

0 comments on commit c8be496

Please sign in to comment.