Bugfix in the maildir code of Camel

Philip Van Hoof <[email protected]> Tue, 26 Jun 2007 11:27:11 +0200
Newsgroups gmane.comp.gnome.evolution.patches
Message-ID <1182850031.6292.8.camel@schtrumpf>
I think rename will return either 0 or -1, not 1

-- 
Philip Van Hoof, software developer
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org 
http://www.pvanhoof.be/blog

_______________________________________________
Evolution-patches mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/evolution-patches
maildir.diff (text/x-patch, 635 B)
Index: trunk/libtinymail-camel/camel-lite/camel/providers/local/camel-maildir-folder.c
===================================================================
--- trunk/libtinymail-camel/camel-lite/camel/providers/local/camel-maildir-folder.c	(revision 2269)
+++ trunk/libtinymail-camel/camel-lite/camel/providers/local/camel-maildir-folder.c	(working copy)
@@ -190,7 +190,7 @@
 	
 	/* now move from tmp to cur (bypass new, does it matter?) */
 	dest = g_strdup_printf("%s/cur/%s", lf->folder_path, camel_maildir_info_filename (mdi));
-	if (rename (name, dest) == 1)
+	if (rename (name, dest) == -1)
 		goto fail_write;
 
 	g_free (dest);