cmd_init_db(): when creating directories, handle errors conservatively
authorMichael Haggerty <mhagger@alum.mit.edu>
Mon, 6 Jan 2014 13:45:26 +0000 (14:45 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 6 Jan 2014 17:34:22 +0000 (09:34 -0800)
safe_create_leading_directories_const() returns a non-zero value on
error. The old code at this calling site recognized a couple of
particular error values, and treated all other return values as
success. Instead, be more conservative: recognize the errors we are
interested in, but treat any other nonzero values as failures. This
is more robust in case somebody adds another possible return value
without telling us.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found