aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog5
-rw-r--r--mail/mail-local.c22
2 files changed, 8 insertions, 19 deletions
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 <fejj@ximian.com>
+
+ * 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 <NotZed@Ximian.com>
* 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);