<DKIM> [PATCH 2/2] remove some rtime nonsense
abdo.roig at gmail.com
Fri Apr 3 01:33:48 BST 2015
> I guess this is wrong in the sense that rtime COULD have a value with
> the utime_from_header thing, at least.
No no, it is really dead code. This patch does not change behaviour.
This belongs to the function savemessagelabels, there is no rtime passed in the
arguments. We set rtime in this line
rtime = self.messagelist[uid].get('rtime', None)
but self.messagelist[uid] has no 'rtime' key. It has 'mtime' for the speeding up
of label change detection, but no 'rtime', so the variable rtime is always None.
On the other hand, GmailMaildir does honor utime_from_header in savemessage,
because it just calls the parent savemessage.
There is an other issue I just realized, which maybe is related to what you had
in mind. Even if utime_from_header=true, syncing a label change updates the file
modification time. So utime_from_header in a GmailMaildir does not guarantee
that the file mtime coincides with the date in the header. It has never
guaranteed that, and this is a bug.
I think that we can honor utime_from_header in GmailMaildir without interfering
with the labels stuff, by just restoring the modification time to the one before
changing labels, only when utime_from_header=true. A patch doing this
follows in an other mail.
If you agree with this, disregard this patch and use the new one, please.
More information about the OfflineIMAP-project