From: Nguyễn Thái Ngọc Duy Date: Thu, 20 Apr 2017 11:26:04 GMT Subject: [PATCH 10/15] sequencer.c: report error on failure to fopen() Message-ID: <20170420112609.26089-11-pclouds@gmail.com> In-Reply-To: <20170420112609.26089-1-pclouds@gmail.com> Signed-off-by: Nguyễn Thái Ngọc Duy --- sequencer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sequencer.c b/sequencer.c index 77afecaebf..8d5ebfc14f 100644 --- a/sequencer.c +++ b/sequencer.c @@ -919,8 +919,11 @@ static void record_in_rewritten(struct object_id *oid, enum todo_command next_command) { FILE *out = fopen(rebase_path_rewritten_pending(), "a"); - if (!out) + if (!out) { + if (errno != ENOENT) + warn_on_inaccessible(rebase_path_rewritten_pending()); return; + } fprintf(out, "%s\n", oid_to_hex(oid)); fclose(out); -- 2.11.0.157.gd943d85