]> git.seodisparate.com - SimpleArchiver/commitdiff
Also fix creating temp_file for creating v1 file
authorStephen Seo <seo.disparate@gmail.com>
Thu, 26 Dec 2024 01:40:04 +0000 (10:40 +0900)
committerStephen Seo <seo.disparate@gmail.com>
Thu, 26 Dec 2024 01:40:04 +0000 (10:40 +0900)
src/archiver.c

index c0c9aafba018c031ef327215bbdbc529f33c4e21..e0569d06b13333d3f042da00769ae8350e0b54aa 100644 (file)
@@ -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.