diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-01-03 09:19:08 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-01-03 09:19:08 +0100 |
commit | 3e0458dda3c12a9a619a86258d586a0542e0c630 (patch) | |
tree | 3905f3d9daf64b6ad9c2945f230c3fb89aa75525 /common/storage_lmdb.cpp | |
parent | c0376d6965a8b6819c2048aa18779d85bb245f63 (diff) | |
download | sink-3e0458dda3c12a9a619a86258d586a0542e0c630.tar.gz sink-3e0458dda3c12a9a619a86258d586a0542e0c630.zip |
Trying to open a db that doesn't exist in read-only mode is not an error
Diffstat (limited to 'common/storage_lmdb.cpp')
-rw-r--r-- | common/storage_lmdb.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/common/storage_lmdb.cpp b/common/storage_lmdb.cpp index 6923d7c..600fbd1 100644 --- a/common/storage_lmdb.cpp +++ b/common/storage_lmdb.cpp | |||
@@ -829,7 +829,11 @@ public: | |||
829 | flags |= MDB_RDONLY; | 829 | flags |= MDB_RDONLY; |
830 | } | 830 | } |
831 | if ((rc = mdb_env_open(env, fullPath.toStdString().data(), flags, 0664))) { | 831 | if ((rc = mdb_env_open(env, fullPath.toStdString().data(), flags, 0664))) { |
832 | SinkWarningCtx(logCtx) << "mdb_env_open: " << rc << ":" << mdb_strerror(rc); | 832 | if (readOnly) { |
833 | SinkLogCtx(logCtx) << "Tried to open non-existing db: " << fullPath; | ||
834 | } else { | ||
835 | SinkWarningCtx(logCtx) << "mdb_env_open: " << rc << ":" << mdb_strerror(rc); | ||
836 | } | ||
833 | mdb_env_close(env); | 837 | mdb_env_close(env); |
834 | env = 0; | 838 | env = 0; |
835 | } else { | 839 | } else { |