+static gboolean
+inbox_is_special (TnyFolderStore *folder_store)
+{
+ gboolean is_special = TRUE;
+
+ if (TNY_IS_FOLDER (folder_store)) {
+ const gchar *id;
+ gchar *downcase;
+ gchar *last_bar;
+ gchar *last_inbox_bar;
+
+ id = tny_folder_get_id (TNY_FOLDER (folder_store));
+ downcase = g_utf8_strdown (id, -1);
+ last_bar = g_strrstr (downcase, "/");
+ if (last_bar) {
+ last_inbox_bar = g_strrstr (downcase, "inbox/");
+ if ((last_inbox_bar == NULL) || (last_inbox_bar + 5 != last_bar))
+ is_special = FALSE;
+ }
+ g_free (downcase);
+ }
+ return is_special;
+}
+