Skip to content

Commit 24f8ddc

Browse files
vemvbbatsov
authored andcommitted
Make artifacts-file cross-OS
1 parent 2d60b56 commit 24f8ddc

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/refactor_nrepl/artifacts.clj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
[version-clj.core :as versions])
99
(:import java.util.zip.GZIPInputStream))
1010

11-
(def artifacts-file (str (System/getProperty "java.io.tmpdir")
12-
"/refactor-nrepl-artifacts-cache"))
11+
(def artifacts-file (str (io/file (System/getProperty "java.io.tmpdir")
12+
"refactor-nrepl-artifacts-cache")))
1313

1414
(defn get-last-modified-from-file
1515
"Returns last modified time in milliseconds or nil if file does not exist."
@@ -18,11 +18,12 @@
1818
(if (zero? lm) nil lm)))
1919

2020
;; structure here is {"prismatic/schem" ["0.1.1" "0.2.0" ...]}
21-
(defonce artifacts (atom (if (.exists (io/as-file artifacts-file))
21+
(defonce artifacts (atom (if (.exists (io/file artifacts-file))
2222
(->> artifacts-file slurp edn/read-string (into {}))
2323
{})
2424
:meta {:last-modified
2525
(get-last-modified-from-file artifacts-file)}))
26+
2627
(def millis-per-day (* 24 60 60 1000))
2728

2829
(defn- get-proxy-opts

0 commit comments

Comments
 (0)