]> code.delx.au - offlineimap/commitdiff
Initial stab at showing list of folders that aren't being synced
authorJohn Goerzen <jgoerzen@complete.org>
Tue, 20 May 2008 06:13:36 +0000 (01:13 -0500)
committerJohn Goerzen <jgoerzen@complete.org>
Tue, 20 May 2008 06:13:36 +0000 (01:13 -0500)
This isn't working right yet because two accounts could sync into one
destination

offlineimap/repository/Base.py

index ed07b572b87872e3749a9e3ee0eddae90d7cfde1..ec56d61f74063265e7a9e5ff4b7867aae5226470 100644 (file)
@@ -17,6 +17,7 @@
 #    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 
 from offlineimap import CustomConfig
 #    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 
 from offlineimap import CustomConfig
+from offlineimap.ui import UIBase
 import os.path
 
 def LoadRepository(name, account, reqtype):
 import os.path
 
 def LoadRepository(name, account, reqtype):
@@ -164,6 +165,17 @@ class BaseRepository(CustomConfig.ConfigHelperMixin):
         #for key in desthash.keys():
         #    if not key in srchash:
         #        dest.deletefolder(key)
         #for key in desthash.keys():
         #    if not key in srchash:
         #        dest.deletefolder(key)
+
+
+        ##### Find any folders that aren't being synced
+        ignoredfolders = []
+        for key in desthash.keys():
+            if not key in srchash:
+                ignoredfolders.append(key)
+
+        ignoredfolders.sort()
+        if ignoredfolders != []:
+            UIBase.getglobalui().warn("Found local folders that are not being synced: %s" % (", ".join(ignoredfolders)))
         
     ##### Keepalive
 
         
     ##### Keepalive