]> code.delx.au - offlineimap/blobdiff - offlineimap/repository/LocalStatus.py
Truncate local status folders on creation
[offlineimap] / 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