Skip to content

Commit bb7be80

Browse files
committed
Fix broken tests
1 parent 54bfc9e commit bb7be80

File tree

1 file changed

+8
-2
lines changed
  • src/main/clojure/clojure/tools/namespace

1 file changed

+8
-2
lines changed

src/main/clojure/clojure/tools/namespace/dir.clj

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
[clojure.set :as set]
1919
[clojure.string :as string])
2020
(:import (System.IO DirectoryInfo FileSystemInfo Path) (System.Text.RegularExpressions Regex))) ;;; (java.io File) (java.util.regex Pattern)
21-
21+
2222
(declare make-dir-info)
2323

2424
(defn- find-files [dirs platform]
@@ -29,9 +29,15 @@
2929
(mapcat #(find/find-sources-in-dir % platform))
3030
)) ;;; ditto: (map #(.getCanonicalFile ^File %))
3131

32+
(defn- milliseconds-since-epoch [^DateTime time]
33+
(long
34+
(/ (- (.-Ticks time)
35+
(.-Ticks DateTime/UnixEpoch))
36+
TimeSpan/TicksPerMillisecond)))
37+
3238
(defn- modified-since-tracked? [tracker file]
3339
(if-let [time (::time tracker)]
34-
(DateTime/op_LessThan time (.LastWriteTimeUtc ^FileSystemInfo file))
40+
(< time (milliseconds-since-epoch (.LastWriteTimeUtc ^FileSystemInfo file)))
3541
true))
3642

3743
(defn- modified-files [tracker files]

0 commit comments

Comments
 (0)