[geary/wip/181-special-folder-dupes] Add some useful debugging to GenericAcount
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/181-special-folder-dupes] Add some useful debugging to GenericAcount
- Date: Mon, 14 Jan 2019 10:51:43 +0000 (UTC)
commit 92b851a350254ac40aa8b94ef0bfce8cf19e3ae5
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 | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 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..708b6750 100644
--- a/src/engine/imap-engine/imap-engine-generic-account.vala
+++ b/src/engine/imap-engine/imap-engine-generic-account.vala
@@ -698,15 +698,13 @@ private abstract class Geary.ImapEngine.GenericAccount : Geary.Account {
Cancellable? cancellable)
throws Error {
Geary.FolderPath? path = information.get_special_folder_path(special);
- if (!remote.is_folder_path_valid(path)) {
+ if (path != null && !remote.is_folder_path_valid(path)) {
debug("Ignoring bad special folder path '%s' for type %s",
path.to_string(),
special.to_string());
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]