Renaming local folders in VFAT FS do not delete the old summary files in non-Windows OS



Hi,

I submitted a bug to Camel upstream because it has the same problem. See
description of the bug here:
http://bugzilla.gnome.org/show_bug.cgi?id=540295

Maybe we could apply the patch to tinymail even if they don't accept it.

Br
Index: libtinymail-camel/camel-lite/camel/providers/local/camel-local-store.c
===================================================================
--- libtinymail-camel/camel-lite/camel/providers/local/camel-local-store.c	(revision 3707)
+++ libtinymail-camel/camel-lite/camel/providers/local/camel-local-store.c	(working copy)
@@ -348,23 +348,9 @@
 			ret = -1;
 		}
 #ifndef G_OS_WIN32
-	} else if (S_ISDIR(st.st_mode)) { /* use rename for dirs */
-		if (rename(old, new) == 0
-		    || stat(new, &st) == 0) {
-			ret = 0;
-		} else {
-			err = errno;
-			ret = -1;
-		}
-	} else if (link(old, new) == 0 /* and link for files */
-		   || (stat(new, &st) == 0 && st.st_nlink == 2)) {
-		if (unlink(old) == 0) {
-			ret = 0;
-		} else {
-			err = errno;
-			unlink(new);
-			ret = -1;
-		}
+	} else if (rename(old, new) == 0
+		   || stat(new, &st) == 0) {
+		ret = 0;
 	} else {
 		err = errno;
 		ret = -1;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]