aboutsummaryrefslogtreecommitdiff
path: root/libsylph/pop.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-11-28 05:43:35 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-11-28 05:43:35 +0000
commit928a2cc8708a85a7fbcceb4d77e163835b158934 (patch)
tree57697350a6f0be8c96d4f2181e22312cb6cb1acd /libsylph/pop.c
parent064a7b172123d65c3bafa35d60ce2c550f30b1ec (diff)
reverted linebreak conversion.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@783 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph/pop.c')
-rw-r--r--libsylph/pop.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/libsylph/pop.c b/libsylph/pop.c
index ec703191..b61eb377 100644
--- a/libsylph/pop.c
+++ b/libsylph/pop.c
@@ -549,9 +549,15 @@ static gint pop3_write_msg_to_file(const gchar *file, FILE *src_fp, guint len)
gint len;
len = strlen(buf);
- if (len > 0)
+ if (len > 0) {
last_ch = buf[len - 1];
- else
+ if (last_ch == '\n' && len > 1 &&
+ buf[len - 2] == '\r') {
+ buf[len - 2] = '\n';
+ buf[len - 1] = '\0';
+ } else if (last_ch == '\r')
+ buf[len - 1] = '\0';
+ } else
last_ch = '\0';
if ((last_ch == '\0' || last_ch == '\n') &&