projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
always build support for mixmaster.
[apps/madmutt.git]
/
lib-mime
/
rfc3676.c
diff --git
a/lib-mime/rfc3676.c
b/lib-mime/rfc3676.c
index
404b02b
..
68bf1f5
100644
(file)
--- a/
lib-mime/rfc3676.c
+++ b/
lib-mime/rfc3676.c
@@
-224,20
+224,21
@@
void rfc3676_space_stuff (HEADER* hdr) {
if ((in = safe_fopen (hdr->content->filename, "r")) == NULL)
return;
if ((in = safe_fopen (hdr->content->filename, "r")) == NULL)
return;
- mutt_mktemp (tmpf);
- if ((out = safe_fopen (tmpf, "w+")) == NULL) {
- fclose (in);
+
+ out = m_tempfile(tmpf, sizeof(tmpf), NONULL(Tempdir), NULL);
+ if (!out) {
+ m_fclose(&in);
return;
}
return;
}
- while (fgets
(buf, sizeof (buf), in)) {
+ while (fgets(buf, sizeof (buf), in)) {
if (m_strncmp("From ", buf, 4) == 0 || buf[0] == ' ') {
fputc (' ', out);
}
fputs (buf, out);
}
if (m_strncmp("From ", buf, 4) == 0 || buf[0] == ' ') {
fputc (' ', out);
}
fputs (buf, out);
}
-
fclose (
in);
-
fclose (
out);
+
m_fclose(&
in);
+
m_fclose(&
out);
mutt_set_mtime (hdr->content->filename, tmpf);
unlink (hdr->content->filename);
m_strreplace(&hdr->content->filename, tmpf);
mutt_set_mtime (hdr->content->filename, tmpf);
unlink (hdr->content->filename);
m_strreplace(&hdr->content->filename, tmpf);