]> git.seodisparate.com - SimpleArchiver/commitdiff
Error message on failure to create temporary file
authorStephen Seo <seo.disparate@gmail.com>
Fri, 27 Dec 2024 03:10:15 +0000 (12:10 +0900)
committerStephen Seo <seo.disparate@gmail.com>
Fri, 27 Dec 2024 03:10:15 +0000 (12:10 +0900)
src/archiver.c

index f9ff1ec0e4bee65fb25ac40e8939e714df5fe12b..2fb59a68b288e54e2da7e1cf4aa7f8f7f0f421e6 100644 (file)
@@ -2721,6 +2721,8 @@ int simple_archiver_write_v1(FILE *out_f, SDArchiverState *state,
       if (!temp_fd) {
         temp_fd = tmpfile();
         if (!temp_fd) {
+          fprintf(stderr,
+                  "ERROR: Failed to create a temporary file for archival!\n");
           return SDAS_INTERNAL_ERROR;
         }
       }
@@ -3603,6 +3605,8 @@ int simple_archiver_write_v2(FILE *out_f, SDArchiverState *state,
       if (!temp_fd) {
         temp_fd = tmpfile();
         if (!temp_fd) {
+          fprintf(stderr,
+                  "ERROR: Failed to create a temporary file for archival!\n");
           return SDAS_INTERNAL_ERROR;
         }
       }