Merge branch 'abdo/decouple_utime_from_header' into next
This commit is contained in:
commit
d52b1de3d0
@ -692,9 +692,6 @@ class BaseFolder(object):
|
||||
message = None
|
||||
flags = self.getmessageflags(uid)
|
||||
rtime = self.getmessagetime(uid)
|
||||
if dstfolder.utime_from_header:
|
||||
content = self.getmessage(uid)
|
||||
rtime = emailutil.get_message_date(content, 'Date')
|
||||
|
||||
# If any of the destinations actually stores the message body,
|
||||
# load it up.
|
||||
@ -766,9 +763,6 @@ class BaseFolder(object):
|
||||
# dst has message with that UID already, only update status
|
||||
flags = self.getmessageflags(uid)
|
||||
rtime = self.getmessagetime(uid)
|
||||
if dstfolder.utime_from_header:
|
||||
content = self.getmessage(uid)
|
||||
rtime = emailutil.get_message_date(content, 'Date')
|
||||
statusfolder.savemessage(uid, None, flags, rtime)
|
||||
continue
|
||||
|
||||
|
@ -324,8 +324,11 @@ class MaildirFolder(BaseFolder):
|
||||
tmpdir = os.path.join(self.getfullname(), 'tmp')
|
||||
messagename = self.new_message_filename(uid, flags)
|
||||
tmpname = self.save_to_tmp_file(messagename, content)
|
||||
if rtime != None:
|
||||
os.utime(os.path.join(self.getfullname(), tmpname), (rtime, rtime))
|
||||
|
||||
if self.utime_from_header:
|
||||
date = emailutil.get_message_date(content, 'Date')
|
||||
if date != None:
|
||||
os.utime(os.path.join(self.getfullname(), tmpname), (date, date))
|
||||
|
||||
self.messagelist[uid] = self.msglist_item_initializer(uid)
|
||||
self.messagelist[uid]['flags'] = flags
|
||||
|
Loading…
Reference in New Issue
Block a user