diff options
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/init-db.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/builtin/init-db.c b/builtin/init-db.c index b3f03cf0d6..c7c76bbf21 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 -3: + case SCLD_OK: + case SCLD_PERMS: + break; + case SCLD_EXISTS: errno = EEXIST; /* fallthru */ - case -1: - die_errno(_("cannot mkdir %s"), argv[0]); - break; default: + die_errno(_("cannot mkdir %s"), argv[0]); break; } shared_repository = saved; |