UIDMappedFolder.savemessage() returned nothing, breaking API conventions

Folder.savemessage() is supposed to return the new UID that a backend
assigned, and it BaseFolder.copymessageto() fails if we don't return a
non-negative number in the savemessage() there.

For some reason, the UIDMappedFolder was not returning anything in
savemessage, despite clearly stating in the code docs that it is
supposed to return a UID. Not sure how long this has already been the
case. This patch fixes the UIDMappedFolder to behave as it should.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
Sebastian Spaeth 2011-06-16 17:22:29 +02:00 committed by Nicolas Sebrecht
parent 856982a4e6
commit 2180f5fbf4

View File

@ -197,6 +197,7 @@ class MappingFolderMixIn:
self._savemaps(dolock = 0)
finally:
self.maplock.release()
return uid
def getmessageflags(self, uid):
return self._mb.getmessageflags(self, self.r2l[uid])