]> git.cworth.org Git - notmuch/blobdiff - lib/open.cc
Merge branch 'release'
[notmuch] / lib / open.cc
index a91d22efe6ecbf5e133dc1daded781229f9bf0a9..54510eace89b04a565a1b868af2d7f88d44f1e66 100644 (file)
@@ -661,16 +661,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;
        }
     }