(Patch) tny_camel_mime_part_set_purged does not lose the filename in disposition



	Hi,

	This patch avoids losing the content disposition filename in camel mime
part in case we have one, after purging the attachment.

	This way, the mime part still keeps a valid filename for showing it
after a purge operation, and you don't need to reget the mime part again
from store.

	Changelog entry:

008-02-21  Jose Dapena Paz  <jdapena igalia com>

	* libtinymail-camel/tny-camel-mime-part.c:
	Do not lose the filename of the attachment disposition in
	case we set it as purged.

-- 
Jose Dapena Paz <jdapena igalia com>
Igalia
Index: libtinymail-camel/tny-camel-mime-part.c
===================================================================
--- libtinymail-camel/tny-camel-mime-part.c	(revision 3423)
+++ libtinymail-camel/tny-camel-mime-part.c	(working copy)
@@ -1161,8 +1161,13 @@
 tny_camel_mime_part_set_purged_default (TnyMimePart *self)
 {
 	TnyCamelMimePartPriv *priv = TNY_CAMEL_MIME_PART_GET_PRIVATE (self);
+	gchar *filename;
 	g_mutex_lock (priv->part_lock);
+	filename = g_strdup (camel_mime_part_get_filename (priv->part));
 	camel_mime_part_set_disposition (priv->part, "purged");
+	if (filename)
+		camel_mime_part_set_filename (priv->part, filename);
+	g_free (filename);
 	g_mutex_unlock (priv->part_lock);
 	return;
 }
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 3423)
+++ ChangeLog	(working copy)
@@ -1,3 +1,9 @@
+2008-02-21  Jose Dapena Paz  <jdapena igalia com>
+
+	* libtinymail-camel/tny-camel-mime-part.c:
+	Do not lose the filename of the attachment disposition in
+	case we set it as purged.
+
 2008-02-20  Philip Van Hoof <pvanhoof gnome org>
 
 	* Improvement for cancel's their reconnection


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