Created
October 31, 2014 12:54
-
-
Save rnewson/e051822d3cc41f8f428e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/src/mem3_util.erl b/src/mem3_util.erl | |
| index bb15e0e..785a27e 100644 | |
| --- a/src/mem3_util.erl | |
| +++ b/src/mem3_util.erl | |
| @@ -221,7 +221,12 @@ ensure_exists(DbName) -> | |
| {ok, Db} -> | |
| {ok, Db}; | |
| _ -> | |
| - couch_server:create(DbName, Options) | |
| + case couch_server:create(DbName, Options) of | |
| + {ok, Db} -> | |
| + {ok, Db}; | |
| + file_exists -> | |
| + ensure_exists(DbName) | |
| + end | |
| end. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment