]> code.delx.au - offlineimap/blobdiff - offlineimap/repository/Base.py
Finally fix the stupid LocalStatus folder bug, I really hope!
[offlineimap] / offlineimap / repository / Base.py
index 93e464b3fb44e5bd25a35e8d0a511cb7d3a33fe7..ed07b572b87872e3749a9e3ee0eddae90d7cfde1 100644 (file)
@@ -125,9 +125,12 @@ class BaseRepository(CustomConfig.ConfigHelperMixin):
     def getfolder(self, foldername):
         raise NotImplementedError
     
-    def syncfoldersto(self, dest):
+    def syncfoldersto(self, dest, copyfolders):
         """Syncs the folders in this repository to those in dest.
-        It does NOT sync the contents of those folders."""
+        It does NOT sync the contents of those folders.
+
+        For every time dest.makefolder() is called, also call makefolder()
+        on each folder in copyfolders."""
         src = self
         srcfolders = src.getfolders()
         destfolders = dest.getfolders()
@@ -150,6 +153,8 @@ class BaseRepository(CustomConfig.ConfigHelperMixin):
         for key in srchash.keys():
             if not key in desthash:
                 dest.makefolder(key)
+                for copyfolder in copyfolders:
+                    copyfolder.makefolder(key.replace(dest.getsep(), copyfolder.getsep()))
 
         #
         # Find deleted folders.