Update src/libstore/local-store.cc

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
This commit is contained in:
Ben Radford 2023-06-15 13:32:35 +01:00 committed by GitHub
parent 78e2f931d0
commit 984b01924a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -496,7 +496,7 @@ int LocalStore::getSchema()
void LocalStore::openDB(State & state, bool create) void LocalStore::openDB(State & state, bool create)
{ {
if (create && readOnly) { if (create && readOnly) {
throw Error("unable to create database while in read-only mode"); throw Error("cannot create database while in read-only mode");
} }
if (access(dbDir.c_str(), R_OK | (readOnly ? 0 : W_OK))) if (access(dbDir.c_str(), R_OK | (readOnly ? 0 : W_OK)))