[Commits] [SCM] claws branch, master, updated. 3.17.3-110-g5fe6b16

ticho at claws-mail.org ticho at claws-mail.org
Fri Mar 1 15:06:13 CET 2019


The branch, master has been updated
       via  5fe6b16b533e148a4e36ac51eaa972bbcd48496f (commit)
      from  a6ece75c6330d9b9f2fe486e205d77c4e186fefa (commit)

Summary of changes:
 src/plugins/vcalendar/vcalendar.c |   18 ++----------------
 1 file changed, 2 insertions(+), 16 deletions(-)


- Log -----------------------------------------------------------------
commit 5fe6b16b533e148a4e36ac51eaa972bbcd48496f
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Fri Mar 1 15:05:58 2019 +0100

    Simplify vcalviewer_get_uid_from_mimeinfo()

diff --git a/src/plugins/vcalendar/vcalendar.c b/src/plugins/vcalendar/vcalendar.c
index 7dcfd9f..0c0490f 100644
--- a/src/plugins/vcalendar/vcalendar.c
+++ b/src/plugins/vcalendar/vcalendar.c
@@ -647,27 +647,13 @@ void vcalviewer_display_event (VCalViewer *vcalviewer, VCalEvent *event)
 
 gchar *vcalviewer_get_uid_from_mimeinfo(MimeInfo *mimeinfo)
 {
-	gchar *tmpfile = procmime_get_tmp_file_name(mimeinfo);
-	const gchar *charset = procmime_mimeinfo_get_parameter(mimeinfo, "charset");
 	gchar *compstr = NULL;
 	gchar *res = NULL;
 	VCalEvent *event = NULL;
 
-	if (procmime_get_part(tmpfile, mimeinfo) < 0) {
-		g_warning("Can't get mimepart file");	
-		g_free(tmpfile);
-		return NULL;
-	}
-	
-	if (!charset)
-		charset = CS_WINDOWS_1252;
-
-	if (!strcasecmp(charset, CS_ISO_8859_1))
-		charset = CS_WINDOWS_1252;
-
-	compstr = file_read_to_str(tmpfile);
+	compstr = procmime_get_part_as_string(mimeinfo);
 	
-	event = vcal_get_event_from_ical(compstr, charset);
+	event = vcal_get_event_from_ical(compstr, NULL);
 	if (event)
 		res = g_strdup(event->uid);
 	

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list