[PATCH] log which temporary file could not be created
- From
Arnout Engelen <arnouten@bzzt.net>
- Date
- Oct 9, 2010, 20:17 UTC
- Message-ID
- <20101009201751.GK9348@bzzt.net>
When creating a temporary file, log the template. Useful for making debugging problems like file permission mistakes easier.
Signed-off-by: Arnout Engelen <arnouten@bzzt.net>
--- wrapper.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/wrapper.c b/wrapper.c index fd8ead3..68053cd 100644 --- a/wrapper.c +++ b/wrapper.c @@ -215,7 +215,7 @@ int xmkstemp(char *template) fd = mkstemp(template); if (fd < 0) - die_errno("Unable to create temporary file"); + die_errno("Unable to create temporary file '%s'", template); return fd; } @@ -225,7 +225,7 @@ int xmkstemp_mode(char *template, int mode) fd = git_mkstemp_mode(template, mode); if (fd < 0) - die_errno("Unable to create temporary file"); + die_errno("Unable to create temporary file '%s'", template); return fd; }
-- 1.7.2.3