https://gitlab.synchro.net/main/sbbs/-/commit/f3289a5bbdc590c6d2bcc950
Modified Files:
exec/load/mailbox_summary.js exec/tests/mailbox/summary.js
Log Message:
Mailbox library: keep the summary when a file's date steps back at close
After its own write, Summary.modify() sets the date of the private
base's files and records it (#1374). On an SMB share the server can,
when the base is closed, put a file's date back to the time of the
write itself. When the write and the date set fell in different
seconds, the file ended up dated one second before the recorded stamp,
and the next request read every header again. Measured on a Samba
share with a 20-message folder: the list after starring a message or
renaming the folder read 20 headers whenever that happened.
The recorded stamps now count as current when the sizes match and a
file's date is the same or up to 2 seconds earlier. A later write moves
a date forward, never back, so an earlier date does not hide one. The
dates are also set right after the write, before the changed headers
are read, to keep the two times close.
With this, the same measurement reads no headers after a star, a
read mark, a delete or a folder rename, also when the date stepped
back.
Co-Authored-By: Claude Fable 5.2 <
noreply@anthropic.com>