]> code.delx.au - offlineimap/commitdiff
Truncate local status folders on creation
authorJohn Goerzen <jgoerzen@complete.org>
Mon, 3 Mar 2008 04:21:10 +0000 (22:21 -0600)
committerJohn Goerzen <jgoerzen@complete.org>
Mon, 3 Mar 2008 04:21:10 +0000 (22:21 -0600)
Should help eliminate problems with old cache

refs deb#459985, refs #19

offlineimap/repository/LocalStatus.py

index c30e1f1a718ea8a5c3c3f74a1de0ada49bb8cdfd..0a13706fa5695a0d580014eacacc097c98d44c7a 100644 (file)
@@ -37,8 +37,8 @@ class LocalStatusRepository(BaseRepository):
         return os.path.join(self.directory, foldername)
 
     def makefolder(self, foldername):
-        # "touch" the file.
-        file = open(self.getfolderfilename(foldername), "ab")
+        # "touch" the file, truncating it.
+        file = open(self.getfolderfilename(foldername), "wb")
         file.close()
         # Invalidate the cache.
         self.folders = None