Skip to content

Commit e090f18

Browse files
author
dnolen
committed
missing setLastModified when copying files from JARs
1 parent 77f089a commit e090f18

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/main/clojure/cljs/closure.clj

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,7 @@
462462
(slurp reader))]
463463
(util/mkdirs out-file)
464464
(spit out-file content)
465+
(.setLastModified ^File out-file (util/last-modified url))
465466
out-file))
466467

467468
;; TODO: it would be nice if we could consolidate requires-compilation?
@@ -1533,20 +1534,20 @@
15331534
:requires (deps/-requires js)
15341535
:provides (deps/-provides js)
15351536
:group (:group js)}
1536-
url (:url js)]
1537+
res (or (:url js) (:source-file js))]
15371538
(when (or (not (.exists out-file))
1538-
(and url (util/changed? out-file url)))
1539-
(when (and url (or ana/*verbose* (:verbose opts)))
1540-
(util/debug-prn "Copying" (str url) "to" (str out-file)))
1539+
(and res (util/changed? out-file res)))
1540+
(when (and res (or ana/*verbose* (:verbose opts)))
1541+
(util/debug-prn "Copying" (str res) "to" (str out-file)))
15411542
(util/mkdirs out-file)
15421543
(spit out-file
15431544
(cond-> js
15441545
(map? js) (assoc :source (deps/-source js))
15451546
(:preprocess js) (js-transforms opts)
15461547
(:module-type js) (convert-js-module opts)
15471548
true deps/-source))
1548-
(when url
1549-
(.setLastModified ^File out-file (util/last-modified url))))
1549+
(when res
1550+
(.setLastModified ^File out-file (util/last-modified res))))
15501551
(if (map? js)
15511552
(merge js ijs)
15521553
ijs)))

0 commit comments

Comments
 (0)