X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=lib%2Fopen.cc;h=4dd62a9f25caafc5baec4803ee883e8bca333018;hb=25e0f5e59293ce961549201fdc74f81a3cc1675c;hp=a942383b84b8cda800ae8006034555e267d11119;hpb=d467444085d96229172ce29ef8654c3c459b6ce2;p=notmuch diff --git a/lib/open.cc b/lib/open.cc index a942383b..4dd62a9f 100644 --- a/lib/open.cc +++ b/lib/open.cc @@ -662,16 +662,12 @@ notmuch_database_create_with_config (const char *database_path, err = mkdir (notmuch_path, 0755); if (err) { - if (errno == EEXIST) { - status = NOTMUCH_STATUS_DATABASE_EXISTS; - talloc_free (notmuch); - notmuch = NULL; - } else { + if (errno != EEXIST) { IGNORE_RESULT (asprintf (&message, "Error: Cannot create directory %s: %s.\n", notmuch_path, strerror (errno))); status = NOTMUCH_STATUS_FILE_ERROR; + goto DONE; } - goto DONE; } }