diff options
author | Stuart Sierra <mail@stuartsierra.com> | 2010-02-11 12:01:00 -0500 |
---|---|---|
committer | Stuart Sierra <mail@stuartsierra.com> | 2010-02-11 12:01:00 -0500 |
commit | c8be49609099ffca541f95b827a41179cbe83080 (patch) | |
tree | cfa30e1afb6e8ce9b5a31b6282b08b2f2e0f2023 | |
parent | 2cae517e6fbb4fa382897bc30a5d93162019fdd0 (diff) |
c.c.io: fix backslash handling in file-str
-rw-r--r-- | src/main/clojure/clojure/contrib/io.clj | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/clojure/clojure/contrib/io.clj b/src/main/clojure/clojure/contrib/io.clj index 415073e4..c303cb73 100644 --- a/src/main/clojure/clojure/contrib/io.clj +++ b/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)) |