aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-08-07 11:54:09 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-08-07 11:54:09 +0800
commit6bdebeda9678e445238803da1b692a53d4641708 (patch)
tree54492c2f5fdcf7e844f77cfe0c615aef253757a2 /mail
parent698c3b1afc1d332229b81ca556a391a38a24306e (diff)
downloadgsoc2013-evolution-6bdebeda9678e445238803da1b692a53d4641708.tar
gsoc2013-evolution-6bdebeda9678e445238803da1b692a53d4641708.tar.gz
gsoc2013-evolution-6bdebeda9678e445238803da1b692a53d4641708.tar.bz2
gsoc2013-evolution-6bdebeda9678e445238803da1b692a53d4641708.tar.lz
gsoc2013-evolution-6bdebeda9678e445238803da1b692a53d4641708.tar.xz
gsoc2013-evolution-6bdebeda9678e445238803da1b692a53d4641708.tar.zst
gsoc2013-evolution-6bdebeda9678e445238803da1b692a53d4641708.zip
No need to save a temporary file first anymore since I updated
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. svn path=/trunk/; revision=17726
Diffstat (limited to 'mail')
-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);