diff options
| author | David Bremner <david@tethera.net> | 2021-12-29 14:20:49 -0400 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2021-12-29 14:20:49 -0400 |
| commit | 3eb25c94bd8fe4065d6df6d665ee393cb9a0ad6f (patch) | |
| tree | 32de70bdd92cce6482af93375339e1f68c2cf8bb /lib/open.cc | |
| parent | 063f5e98620e2f2adeaa8b3313cdac85eb4ef4db (diff) | |
| parent | 14c4f9441d7fe0893003a5e793e19f1e55c9f73f (diff) | |
Merge branch 'release'
Diffstat (limited to 'lib/open.cc')
| -rw-r--r-- | lib/open.cc | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/open.cc b/lib/open.cc index a91d22ef..54510eac 100644 --- a/lib/open.cc +++ b/lib/open.cc @@ -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; } } |
