summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--builtin/init-db.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/builtin/init-db.c b/builtin/init-db.c
index 0bc14f3c81..ceeb138ba8 100644
--- a/builtin/init-db.c
+++ b/builtin/init-db.c
@@ -515,13 +515,14 @@ int cmd_init_db(int argc, const char **argv, const char *prefix)
saved = shared_repository;
shared_repository = 0;
switch (safe_create_leading_directories_const(argv[0])) {
+ case SCLD_OK:
+ case SCLD_PERMS:
+ break;
case SCLD_EXISTS:
errno = EEXIST;
/* fallthru */
- case SCLD_FAILED:
- die_errno(_("cannot mkdir %s"), argv[0]);
- break;
default:
+ die_errno(_("cannot mkdir %s"), argv[0]);
break;
}
shared_repository = saved;