aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-local.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/mail-local.c')
-rw-r--r--mail/mail-local.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/mail/mail-local.c b/mail/mail-local.c
index 22df0333d1..96e8b6c037 100644
--- a/mail/mail-local.c
+++ b/mail/mail-local.c
@@ -97,9 +97,16 @@ load_metainfo(const char *path)
node = node->childs;
while (node) {
if (!strcmp(node->name, "folder")) {
- char *index;
- meta->format = xmlGetProp(node, "type");
- meta->name = xmlGetProp(node, "name");
+ char *index, *txt;
+
+ txt = xmlGetProp(node, "type");
+ meta->format = g_strdup (txt ? txt : "mbox");
+ xmlFree (txt);
+
+ txt = xmlGetProp(node, "name");
+ meta->name = g_strdup (txt ? txt : "mbox");
+ xmlFree (txt);
+
index = xmlGetProp(node, "index");
if (index) {
meta->indexed = atoi(index);