Let file-entities recognize the file-write-date as the last-modified
date.
This commit is contained in:
@ -126,8 +126,10 @@ used to call `reinitialize-instance' on the entity."))
|
|||||||
(let ((file-stream (slot-value entity 'file-stream)))
|
(let ((file-stream (slot-value entity 'file-stream)))
|
||||||
(if (and (streamp file-stream) (open-stream-p file-stream))
|
(if (and (streamp file-stream) (open-stream-p file-stream))
|
||||||
file-stream
|
file-stream
|
||||||
(setf (slot-value entity 'file-stream)
|
(let ((stream (open (entity-pathname entity) :direction :input)))
|
||||||
(open (entity-pathname entity) :direction :input)))))
|
(setf (slot-value entity 'last-modified) (file-write-date stream)
|
||||||
|
(slot-value entity 'file-stream) stream)
|
||||||
|
stream))))
|
||||||
|
|
||||||
(defclass cached-entity-mixin ()
|
(defclass cached-entity-mixin ()
|
||||||
((rendered-body)))
|
((rendered-body)))
|
||||||
|
|||||||
Reference in New Issue
Block a user