summaryrefslogtreecommitdiff
path: root/bugreport.c
diff options
context:
space:
mode:
Diffstat (limited to 'bugreport.c')
-rw-r--r--bugreport.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/bugreport.c b/bugreport.c
index 28f4568b01..09579e268d 100644
--- a/bugreport.c
+++ b/bugreport.c
@@ -180,7 +180,9 @@ int cmd_main(int argc, const char **argv)
die(_("couldn't create a new file at '%s'"), report_path.buf);
}
- strbuf_write_fd(&buffer, report);
+ if (write_in_full(report, buffer.buf, buffer.len) < 0)
+ die_errno(_("unable to write to %s"), report_path.buf);
+
close(report);
/*