if keys database cannot be opened due to permissions, ignore
This lets readonly repos be used. If a repo is readonly, we can ignore the keys database, because nothing that we can do will change the state of the repo anyway.
This commit is contained in:
parent
0983f136b8
commit
9df13e73ae
5 changed files with 33 additions and 7 deletions
|
@ -26,8 +26,8 @@ import Prelude
|
|||
newtype DbHandle = DbHandle (MVar DbState)
|
||||
|
||||
-- The database can be closed or open, but it also may have been
|
||||
-- tried to open (for read) and didn't exist yet.
|
||||
data DbState = DbClosed | DbOpen H.DbQueue | DbEmpty
|
||||
-- tried to open (for read) and didn't exist yet or is not readable.
|
||||
data DbState = DbClosed | DbOpen H.DbQueue | DbUnavailable
|
||||
|
||||
newDbHandle :: IO DbHandle
|
||||
newDbHandle = DbHandle <$> newMVar DbClosed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue