Let file-entities recognize the file-write-date as the last-modified

date.
This commit is contained in:
2001-04-07 14:32:26 +00:00
parent da21cd5604
commit c8b0a61a1d

View File

@ -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)))