[geary/wip/181-special-folder-dupes] Add some useful debugging to GenericAcount



commit 58ff6ae06abacc93d289ff112251848149980a28
Author: Michael Gratton <mike vee net>
Date:   Mon Jan 14 18:08:31 2019 +1100

    Add some useful debugging to GenericAcount

 src/engine/imap-engine/imap-engine-generic-account.vala | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/src/engine/imap-engine/imap-engine-generic-account.vala 
b/src/engine/imap-engine/imap-engine-generic-account.vala
index f24a6027..b16c1368 100644
--- a/src/engine/imap-engine/imap-engine-generic-account.vala
+++ b/src/engine/imap-engine/imap-engine-generic-account.vala
@@ -705,8 +705,6 @@ private abstract class Geary.ImapEngine.GenericAccount : Geary.Account {
             path = null;
         }
         if (path == null) {
-            debug("Guessing path for special folder type: %s",
-                  special.to_string());
             Geary.FolderPath root =
                 yield remote.get_default_personal_namespace(cancellable);
             Gee.List<string> search_names = special_search_names.get(special);
@@ -725,6 +723,9 @@ private abstract class Geary.ImapEngine.GenericAccount : Geary.Account {
             if (path == null)
                 path = root.get_child(search_names[0]);
 
+            debug("Guessed folder \'%s\' for special_path %s",
+                  path.to_string(), special.to_string()
+            );
             information.set_special_folder_path(special, path);
         }
 
@@ -1159,6 +1160,15 @@ internal class Geary.ImapEngine.UpdateRemoteFolders : AccountOperation {
                 cancellable
             );
 
+            debug("Existing folders:");
+            foreach (FolderPath path in existing_folders.keys) {
+                debug(" - %s (%u)", path.to_string(), path.hash());
+            }
+            debug("Remote folders:");
+            foreach (FolderPath path in remote_folders.keys) {
+                debug(" - %s (%u)", path.to_string(), path.hash());
+            }
+
             // pair the local and remote folders and make sure
             // everything is up-to-date
             yield update_folders_async(


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]