projects
/
modest
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Better error checking inserting images in editor
[modest]
/
src
/
modest-tny-folder.c
diff --git
a/src/modest-tny-folder.c
b/src/modest-tny-folder.c
index
f29fef7
..
ee0f224
100644
(file)
--- a/
src/modest-tny-folder.c
+++ b/
src/modest-tny-folder.c
@@
-30,6
+30,7
@@
#include <glib.h>
#include <glib/gi18n.h>
#include <string.h>
#include <glib.h>
#include <glib/gi18n.h>
#include <string.h>
+#include <modest-defs.h>
#include <modest-tny-folder.h>
#include <modest-tny-account.h>
#include <modest-tny-outbox-account.h>
#include <modest-tny-folder.h>
#include <modest-tny-account.h>
#include <modest-tny-outbox-account.h>
@@
-84,6
+85,9
@@
modest_tny_folder_guess_folder_type (TnyFolder *folder)
if ((strlen (downcase) == 5) &&
!strncmp (downcase, "inbox", 5))
type = TNY_FOLDER_TYPE_INBOX;
if ((strlen (downcase) == 5) &&
!strncmp (downcase, "inbox", 5))
type = TNY_FOLDER_TYPE_INBOX;
+ if ((strlen (downcase) == 7) &&
+ !strncmp (downcase, "archive", 7))
+ type = TNY_FOLDER_TYPE_ARCHIVE;
g_free (downcase);
}
g_object_unref (parent);
g_free (downcase);
}
g_object_unref (parent);
@@
-429,6
+433,7
@@
modest_tny_folder_has_subfolder_with_name (TnyFolderStore *parent,
folder = (TnyFolder*)tny_iterator_get_current (iter);
if (!folder || ! TNY_IS_FOLDER(folder)) {
g_warning ("%s: invalid folder", __FUNCTION__);
folder = (TnyFolder*)tny_iterator_get_current (iter);
if (!folder || ! TNY_IS_FOLDER(folder)) {
g_warning ("%s: invalid folder", __FUNCTION__);
+ tny_iterator_next (iter);
continue;
}
continue;
}
@@
-436,6
+441,7
@@
modest_tny_folder_has_subfolder_with_name (TnyFolderStore *parent,
if (!name) {
g_warning ("%s: folder name == NULL", __FUNCTION__);
g_object_unref (folder);
if (!name) {
g_warning ("%s: folder name == NULL", __FUNCTION__);
g_object_unref (folder);
+ tny_iterator_next (iter);
continue;
}
continue;
}