From a1ddd5c64de012f9c8a315212edc4169329bc5bc Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Fri, 27 Dec 2024 12:10:15 +0900 Subject: [PATCH] Error message on failure to create temporary file --- src/archiver.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/archiver.c b/src/archiver.c index f9ff1ec..2fb59a6 100644 --- a/src/archiver.c +++ b/src/archiver.c @@ -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; } } -- 2.49.0