/offlineimap/head: changeset 273
Handle uidvalidity file in an atomic fashion
This commit is contained in:
parent
09a2ac9221
commit
4ab770bb3d
@ -5,6 +5,7 @@ offlineimap (3.99.2) unstable; urgency=low
|
|||||||
50 debug messages, whether or not debugging was enabled for this
|
50 debug messages, whether or not debugging was enabled for this
|
||||||
session. This way, even unexpected and non-repeatable errors stand
|
session. This way, even unexpected and non-repeatable errors stand
|
||||||
a chance of getting a more detailed log.
|
a chance of getting a more detailed log.
|
||||||
|
* Handle uidvalidity file in an atomic fashion. CLoses: #165600.
|
||||||
|
|
||||||
-- John Goerzen <jgoerzen@complete.org> Tue, 15 Oct 2002 12:35:42 -0500
|
-- John Goerzen <jgoerzen@complete.org> Tue, 15 Oct 2002 12:35:42 -0500
|
||||||
|
|
||||||
|
@ -62,9 +62,10 @@ class MaildirFolder(BaseFolder):
|
|||||||
return self.uidvalidity
|
return self.uidvalidity
|
||||||
|
|
||||||
def saveuidvalidity(self, newval):
|
def saveuidvalidity(self, newval):
|
||||||
file = open(self.uidfilename, "wt")
|
file = open(self.uidfilename + ".tmp", "wt")
|
||||||
file.write("%d\n" % newval)
|
file.write("%d\n" % newval)
|
||||||
file.close()
|
file.close()
|
||||||
|
os.rename(self.uidfilename + ".tmp", self.uidfilename)
|
||||||
self.uidvalidity = newval
|
self.uidvalidity = newval
|
||||||
|
|
||||||
def isuidvalidityok(self, remotefolder):
|
def isuidvalidityok(self, remotefolder):
|
||||||
|
Loading…
Reference in New Issue
Block a user