diff options
Diffstat (limited to 'builtin-init-db.c')
-rw-r--r-- | builtin-init-db.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin-init-db.c b/builtin-init-db.c index 0be2d2ef6e..976f47b323 100644 --- a/builtin-init-db.c +++ b/builtin-init-db.c @@ -40,7 +40,8 @@ static int copy_file(const char *dst, const char *src, int mode) return fdo; } status = copy_fd(fdi, fdo); - close(fdo); + if (close(fdo) != 0) + return error("%s: write error: %s", dst, strerror(errno)); if (!status && adjust_shared_perm(dst)) return -1; |