From: Stephen Seo Date: Fri, 27 Dec 2024 03:10:15 +0000 (+0900) Subject: Error message on failure to create temporary file X-Git-Tag: 1.10^2~4 X-Git-Url: https://git.seodisparate.com/stephenseo/annotated.html?a=commitdiff_plain;h=a1ddd5c64de012f9c8a315212edc4169329bc5bc;p=SimpleArchiver Error message on failure to create temporary file --- 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; } }