/offlineimap/head: changeset 273
Handle uidvalidity file in an atomic fashion
This commit is contained in:
		| @@ -5,6 +5,7 @@ offlineimap (3.99.2) unstable; urgency=low | ||||
|     50 debug messages, whether or not debugging was enabled for this | ||||
|     session.  This way, even unexpected and non-repeatable errors stand | ||||
|     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 | ||||
|  | ||||
|   | ||||
| @@ -62,9 +62,10 @@ class MaildirFolder(BaseFolder): | ||||
|         return self.uidvalidity | ||||
|  | ||||
|     def saveuidvalidity(self, newval): | ||||
|         file = open(self.uidfilename, "wt") | ||||
|         file = open(self.uidfilename + ".tmp", "wt") | ||||
|         file.write("%d\n" % newval) | ||||
|         file.close() | ||||
|         os.rename(self.uidfilename + ".tmp", self.uidfilename) | ||||
|         self.uidvalidity = newval | ||||
|  | ||||
|     def isuidvalidityok(self, remotefolder): | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 jgoerzen
					jgoerzen