Commit a8dc498cde1703834a07e5043fb220393dd95bfa

Thomas de Grivel 2014-05-27T18:56:37

Make asset-write-date return -1 when one of the sources is missing.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff --git a/asset.lisp b/asset.lisp
index 889bdff..43b1242 100644
--- a/asset.lisp
+++ b/asset.lisp
@@ -82,8 +82,11 @@
     (ignore-errors (format stream " ~S" (asset-source-path asset)))))
 
 (defmethod asset-write-date ((assets cons))
-  (loop for a in assets
-     maximize (file-write-date (asset-source-path a))))
+  (loop
+     for a in assets
+     for path = (asset-source-path a)
+     unless (probe-file path) do (return -1)
+     maximize (file-write-date path)))
 
 (defmethod asset-sources% ((asset asset))
   (list asset))