* src/procmime.c
Fix procmime_encode_content doing horribly wrong
stuff when encoding to B64 from memory
+2004-12-09 [colin] 0.9.13cvs10
+
+ * src/procmime.c
+ Fix procmime_encode_content doing horribly wrong
+ stuff when encoding to B64 from memory
+
2004-12-08 [colin] 0.9.13cvs9
* src/gtk/colorlabel.c
2004-12-08 [colin] 0.9.13cvs9
* src/gtk/colorlabel.c
( cvs diff -u -r 1.36 -r 1.37 src/matcher_parser_parse.y; cvs diff -u -r 1.28 -r 1.29 src/msgcache.c; cvs diff -u -r 1.48 -r 1.49 src/prefs_matcher.c; cvs diff -u -r 1.60 -r 1.61 src/procheader.c; cvs diff -u -r 1.88 -r 1.89 src/matcher.c; cvs diff -u -r 1.17 -r 1.18 src/common/defs.h; ) > 0.9.13cvs7.patchset
( cvs diff -u -r 1.26 -r 1.27 src/quote_fmt_parse.y ) > 0.9.13cvs8.patchset
( cvs diff -u -r 1.4 -r 1.5 src/gtk/colorlabel.c; ) > 0.9.13cvs9.patchset
( cvs diff -u -r 1.36 -r 1.37 src/matcher_parser_parse.y; cvs diff -u -r 1.28 -r 1.29 src/msgcache.c; cvs diff -u -r 1.48 -r 1.49 src/prefs_matcher.c; cvs diff -u -r 1.60 -r 1.61 src/procheader.c; cvs diff -u -r 1.88 -r 1.89 src/matcher.c; cvs diff -u -r 1.17 -r 1.18 src/common/defs.h; ) > 0.9.13cvs7.patchset
( cvs diff -u -r 1.26 -r 1.27 src/quote_fmt_parse.y ) > 0.9.13cvs8.patchset
( cvs diff -u -r 1.4 -r 1.5 src/gtk/colorlabel.c; ) > 0.9.13cvs9.patchset
+( cvs diff -u -r 1.100 -r 1.101 src/procmime.c; ) > 0.9.13cvs10.patchset
MICRO_VERSION=13
INTERFACE_AGE=0
BINARY_AGE=0
MICRO_VERSION=13
INTERFACE_AGE=0
BINARY_AGE=0
EXTRA_RELEASE=
if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then
EXTRA_RELEASE=
if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then
if (mimeinfo->type == MIMETYPE_TEXT ||
mimeinfo->type == MIMETYPE_MESSAGE) {
if (mimeinfo->type == MIMETYPE_TEXT ||
mimeinfo->type == MIMETYPE_MESSAGE) {
- tmp_file = get_tmp_file();
- if (canonicalize_file(mimeinfo->data.filename, tmp_file) < 0) {
- g_free(tmp_file);
- fclose(infp);
- }
- if ((tmp_fp = fopen(tmp_file, "rb")) == NULL) {
- FILE_OP_ERROR(tmp_file, "fopen");
- unlink(tmp_file);
- g_free(tmp_file);
+ if (mimeinfo->content == MIMECONTENT_FILE) {
+ tmp_file = get_tmp_file();
+ if (canonicalize_file(mimeinfo->data.filename, tmp_file) < 0) {
+ g_free(tmp_file);
+ fclose(infp);
+ return FALSE;
+ }
+ if ((tmp_fp = fopen(tmp_file, "rb")) == NULL) {
+ FILE_OP_ERROR(tmp_file, "fopen");
+ unlink(tmp_file);
+ g_free(tmp_file);
+ fclose(infp);
+ return FALSE;
+ }
+ } else {
+ gchar *out = canonicalize_str(mimeinfo->data.mem);
+ tmp_fp = infp = str_open_as_stream(out);
+ g_free(out);
+ if (infp == NULL)
+ return FALSE;
fclose(tmp_fp);
unlink(tmp_file);
g_free(tmp_file);
fclose(tmp_fp);
unlink(tmp_file);
g_free(tmp_file);
} else if (encoding == ENC_QUOTED_PRINTABLE) {
gchar inbuf[BUFFSIZE], outbuf[BUFFSIZE * 4];
} else if (encoding == ENC_QUOTED_PRINTABLE) {
gchar inbuf[BUFFSIZE], outbuf[BUFFSIZE * 4];