talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit df5a9f61d1eaae68a77de60c8b9398925542e37b
parent 2edb13e5831d2e8b17274cf628a1ff1399da7bfd
Author: Colin Leroy <colin@colino.net>
Date:   Wed, 10 Oct 2018 10:22:09 +0200

str_open_as_stream() doesn't need a real file either.

Diffstat:
Msrc/common/file-utils.c | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/common/file-utils.c b/src/common/file-utils.c @@ -872,7 +872,10 @@ FILE *str_open_as_stream(const gchar *str) cm_return_val_if_fail(str != NULL, NULL); - fp = my_tmpfile(); + len = strlen(str); + + fp = my_tmpfile_with_len(len); + if (!fp) { FILE_OP_ERROR("str_open_as_stream", "my_tmpfile"); return NULL;