diff options
author | Tony Finch <dot@dotat.at> | 2011-06-07 16:48:44 +0100 |
---|---|---|
committer | Tony Finch <dot@dotat.at> | 2011-06-07 16:48:44 +0100 |
commit | 0ca0cf52fa9c635984937a3cc813d38fcdacd7ab (patch) | |
tree | a95cc7166b386d14f3ecd5a43a070d0874f9c3c2 /src | |
parent | ab42bd23609158bd5c00e3e4bd02535a3d9af5af (diff) |
Ensure we log the error message when unlink() fails.
See also commit ID 0761d44e
Diffstat (limited to 'src')
-rw-r--r-- | src/src/deliver.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/src/deliver.c b/src/src/deliver.c index 41e4a66f3..6cb34857f 100644 --- a/src/src/deliver.c +++ b/src/src/deliver.c @@ -6575,10 +6575,12 @@ if (addr_defer == NULL) sprintf(CS spoolname, "%s/input/%s/%s-D", spool_directory, message_subdir, id); if (Uunlink(spoolname) < 0) - log_write(0, LOG_MAIN|LOG_PANIC_DIE, "failed to unlink %s", spoolname); + log_write(0, LOG_MAIN|LOG_PANIC_DIE, "failed to unlink %s: %s", + spoolname, strerror(errno)); sprintf(CS spoolname, "%s/input/%s/%s-H", spool_directory, message_subdir, id); if (Uunlink(spoolname) < 0) - log_write(0, LOG_MAIN|LOG_PANIC_DIE, "failed to unlink %s", spoolname); + log_write(0, LOG_MAIN|LOG_PANIC_DIE, "failed to unlink %s: %s", + spoolname, strerror(errno)); /* Log the end of this message, with queue time if requested. */ |