From 6bdebeda9678e445238803da1b692a53d4641708 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Wed, 7 Aug 2002 03:54:09 +0000 Subject: No need to save a temporary file first anymore since I updated 2002-08-06 Jeffrey Stedfast * mail-local.c (save_metainfo): No need to save a temporary file first anymore since I updated e_xml_save_file() to do this for us. svn path=/trunk/; revision=17726 --- mail/ChangeLog | 5 +++++ mail/mail-local.c | 22 +++------------------- 2 files changed, 8 insertions(+), 19 deletions(-) (limited to 'mail') diff --git a/mail/ChangeLog b/mail/ChangeLog index 668123ed90..bdbfa1e63a 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,8 @@ +2002-08-06 Jeffrey Stedfast + + * mail-local.c (save_metainfo): No need to save a temporary file + first anymore since I updated e_xml_save_file() to do this for us. + 2002-08-07 Not Zed * message-tag-followup.c (target_date_new): Set the week start day diff --git a/mail/mail-local.c b/mail/mail-local.c index dd7cfe83ee..e46561ab23 100644 --- a/mail/mail-local.c +++ b/mail/mail-local.c @@ -204,11 +204,10 @@ save_metainfo (struct _local_meta *meta) { xmlDocPtr doc; xmlNodePtr root, node; - char *path, *slash; - int errsav, ret; - + int ret; + d(printf("Saving folder metainfo to : %s\n", meta->path)); - + doc = xmlNewDoc("1.0"); root = xmlNewDocNode(doc, NULL, "folderinfo", NULL); xmlDocSetRootElement(doc, root); @@ -218,22 +217,7 @@ save_metainfo (struct _local_meta *meta) xmlSetProp(node, "name", meta->name); xmlSetProp(node, "index", meta->indexed?"1":"0"); - path = alloca (strlen (meta->path) + 5); - slash = strrchr (meta->path, '/'); - if (slash) - sprintf (path, "%.*s.#%s", slash - meta->path + 1, meta->path, slash + 1); - else - sprintf (path, ".#%s", meta->path); - ret = e_xml_save_file (path, doc); - if (ret != -1) - ret = rename (path, meta->path); - - if (ret == -1) { - errsav = errno; - unlink (path); - errno = errsav; - } xmlFreeDoc (doc); -- cgit