use file name for WebCal subscription folder name
authorPaul <paul@claws-mail.org>
Wed, 31 Aug 2016 11:37:03 +0000 (12:37 +0100)
committerPaul <paul@claws-mail.org>
Wed, 31 Aug 2016 11:37:03 +0000 (12:37 +0100)
also remove the string length limit, which broke saving folder
properties

src/plugins/vcalendar/vcal_folder.c

index 76a035240630893d6fc7e7f7cc413e98feada27e..e462fe019302970216946340101f6fb95ac4f219 100644 (file)
@@ -1852,14 +1852,10 @@ static void update_subscription_finish(const gchar *uri, gchar *feed, gboolean v
                gchar *title = feed_get_title(feed);
                if (title == NULL) {
                        if (strstr(uri, "://"))
-                               title = g_strdup(strstr(uri,"://")+3);
+                               title = g_path_get_basename(strstr(uri,"://")+3);
                        else
                                title = g_strdup(uri);
                        subst_for_filename(title);
-                       if (strlen(title) > 32) {
-                               title[29]=title[30]=title[31]='.';
-                               title[32]='\0';
-                       }
                }
                item = folder_create_folder(root->node->data, title);
                if (!item) {