Prevent modifications on a folder level to occur in dry-run

Prevent savemessage(), and savemessageflags() to occur in dryrun mode in
all backends. Still need to protect against deletemessage().

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
Sebastian Spaeth
2011-09-16 11:44:50 +02:00
parent b6807355b5
commit 5ef69e95c0
7 changed files with 81 additions and 7 deletions

View File

@ -216,6 +216,11 @@ class LocalStatusSQLiteFolder(LocalStatusFolder):
# assert False,"getmessageflags() called on non-existing message"
def savemessage(self, uid, content, flags, rtime):
"""Writes a new message, with the specified uid.
See folder/Base for detail. Note that savemessage() does not
check against dryrun settings, so you need to ensure that
savemessage is never called in a dryrun mode."""
if uid < 0:
# We cannot assign a uid.
return uid