2005-08-27 [colin] 1.9.13cvs66
authorColin Leroy <colin@colino.net>
Sat, 27 Aug 2005 20:41:49 +0000 (20:41 +0000)
committerColin Leroy <colin@colino.net>
Sat, 27 Aug 2005 20:41:49 +0000 (20:41 +0000)
* src/imap.c
* src/procmime.c
Correctly fix "Problem with replies", fixes
pgpmime encryption too. pgpinline seems to
have a problem

ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/imap.c
src/procmime.c

index 1f087b4042418ab2e9f78726377dd8198dc73692..f9259d42dd9f2294b64478beff190fc35834abaa 100644 (file)
@@ -1,3 +1,11 @@
+2005-08-27 [colin]     1.9.13cvs66
+
+       * src/imap.c
+       * src/procmime.c
+               Correctly fix "Problem with replies", fixes
+               pgpmime encryption too. pgpinline seems to 
+               have a problem
+
 2005-08-27 [colin]     1.9.13cvs65
 
        * src/folder.c
index f1c7c59e1b7fd62a4b4adf36db72724c48672400..4ebe92d1b1e2fe36dbdafc737e3a12189db40e7f 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.179.2.60 -r 1.179.2.61 src/imap.c;  cvs diff -u -r 1.1.4.17 -r 1.1.4.18 src/etpan/imap-thread.c;  cvs diff -u -r 1.1.4.4 -r 1.1.4.5 src/etpan/imap-thread.h;  cvs diff -u -r 1.1 -r 1.2 src/gtk/.cvsignore;  ) > 1.9.13cvs63.patchset
 ( cvs diff -u -r 1.25.2.5 -r 1.25.2.6 tools/Makefile.am;  diff -u /dev/null tools/asus_mailled.sh;  ) > 1.9.13cvs64.patchset
 ( cvs diff -u -r 1.213.2.53 -r 1.213.2.54 src/folder.c;  cvs diff -u -r 1.150.2.41 -r 1.150.2.42 src/procmsg.c;  cvs diff -u -r 1.60.2.15 -r 1.60.2.16 src/procmsg.h;  cvs diff -u -r 1.395.2.116 -r 1.395.2.117 src/summaryview.c;  ) > 1.9.13cvs65.patchset
+( cvs diff -u -r 1.179.2.61 -r 1.179.2.62 src/imap.c;  cvs diff -u -r 1.49.2.57 -r 1.49.2.58 src/procmime.c;  ) > 1.9.13cvs66.patchset
index a1302eab944563687a168396597c5d2b0a8f9dc7..2daabf4a4404e3283d1ff723ceef3169e8e4bdde 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=13
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=65
+EXTRA_VERSION=66
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 0df9ae7bac0af7cdf13d17409bb603df40316010..d320ca42436092a2cfc8023bf2189f47919cd386 100644 (file)
@@ -855,6 +855,37 @@ static guint get_size_with_lfs(MsgInfo *info)
        return cnt;
 }
 
+static void strip_crs(const gchar *file) 
+{
+       FILE *fp = NULL, *outfp = NULL;
+       gchar buf[4096];
+       gchar *out = get_tmp_file();
+       if (file == NULL)
+               return;
+       
+       fp = fopen(file, "rb");
+       if (!fp)
+               return;
+
+       outfp = fopen(out, "wb");
+       if (!outfp)
+               return;
+       
+       while (fgets(buf, sizeof (buf), fp) != NULL) {
+               while (strstr(buf, "\r")) {
+                       gchar *cr = strstr(buf, "\r") ;
+                       *cr = '\n';
+                       cr++;
+                       *cr = '\0';
+               }
+               fputs(buf, outfp);
+       }
+       
+       fclose(fp);
+       fclose(outfp);
+       rename_force(out, file);
+}
+
 static gchar *imap_fetch_msg_full(Folder *folder, FolderItem *item, gint uid,
                                  gboolean headers, gboolean body)
 {
@@ -890,6 +921,7 @@ static gchar *imap_fetch_msg_full(Folder *folder, FolderItem *item, gint uid,
                if (cached && (cached->size == have_size || !body)) {
                        procmsg_msginfo_free(cached);
                        procmsg_msginfo_free(msginfo);
+                       strip_crs(filename);
                        return filename;
                } else {
                        procmsg_msginfo_free(cached);
@@ -921,6 +953,7 @@ static gchar *imap_fetch_msg_full(Folder *folder, FolderItem *item, gint uid,
                return NULL;
        }
 
+       strip_crs(filename);
        return filename;
 }
 
index 8bf8f6c354c092e87b414aed923e75d079473de5..fc671d7e974ee57e30ea71b449cd8832ff16cc2d 100644 (file)
@@ -2167,10 +2167,6 @@ gint procmime_write_mimeinfo(MimeInfo *mimeinfo, FILE *fp)
                switch (mimeinfo->type) {
                case MIMETYPE_MESSAGE:
                        if (g_ascii_strcasecmp(mimeinfo->subtype, "rfc822") == 0) {
-                               if (mimeinfo->encoding_type == ENC_UNKNOWN
-                               &&  mimeinfo->content != MIMECONTENT_EMPTY)
-                                       procmime_encode_content(mimeinfo, ENC_BINARY);
-
                                return procmime_write_message_rfc822(mimeinfo, fp);
                        }
                        break;