Thread (63 messages) 63 messages, 2 authors, 2016-09-09
STALE3609d
Revisions (3)
  1. v1 current
  2. v2 [diff vs current]
  3. v3 [diff vs current]

[PATCH 09/15] sequencer: lib'ify create_seq_dir()

From: Johannes Schindelin <hidden>
Date: 2016-08-23 16:14:11
Subsystem: the rest · Maintainer: Linus Torvalds

To be truly useful, the sequencer should never die() but always return
an error.

Signed-off-by: Johannes Schindelin <redacted>
---
 sequencer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sequencer.c b/sequencer.c
index 1bcea84..1706ef4 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -839,8 +839,8 @@ static int create_seq_dir(void)
 		return -1;
 	}
 	else if (mkdir(git_path_seq_dir(), 0777) < 0)
-		die_errno(_("Could not create sequencer directory %s"),
-			  git_path_seq_dir());
+		return error(_("Could not create sequencer directory %s (%s)"),
+			  git_path_seq_dir(), strerror(errno));
 	return 0;
 }
 
-- 
2.10.0.rc1.99.gcd66998

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help