From: Stephen Seo Date: Thu, 26 Dec 2024 01:40:04 +0000 (+0900) Subject: Also fix creating temp_file for creating v1 file X-Git-Tag: 1.10^2~7 X-Git-Url: https://git.seodisparate.com/stephenseo/server_config?a=commitdiff_plain;h=1c68ac907edf923e0c15104378eb8e26d62b0b0a;p=SimpleArchiver Also fix creating temp_file for creating v1 file --- diff --git a/src/archiver.c b/src/archiver.c index c0c9aaf..e0569d0 100644 --- a/src/archiver.c +++ b/src/archiver.c @@ -2725,7 +2725,10 @@ int simple_archiver_write_v1(FILE *out_f, SDArchiverState *state, } if (!temp_fd) { - return SDAS_INTERNAL_ERROR; + temp_fd = tmpfile(); + if (!temp_fd) { + return SDAS_INTERNAL_ERROR; + } } // Handle SIGPIPE.