Skip to content

Commit

Permalink
Merge PR #2656: Revert read-only leveldb database
Browse files Browse the repository at this point in the history
* Revert read-only leveldb database

Waiting on a fix for syndtr/goleveldb#240.

* Update client/keys/utils.go
  • Loading branch information
alessio authored and cwgoes committed Nov 1, 2018
1 parent c5238b0 commit 3657ff4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion client/keys/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,12 @@ func GetKeyBaseFromDirWithWritePerm(rootDir string) (keys.Keybase, error) {

// GetKeyBaseFromDir initializes a read-only keybase at a particular dir.
func GetKeyBaseFromDir(rootDir string) (keys.Keybase, error) {
return getKeyBaseFromDirWithOpts(rootDir, &opt.Options{ReadOnly: true})
// Disabled because of the inability to create a new keys database directory
// in the instance of when ReadOnly is set to true.
//
// ref: syndtr/goleveldb#240
// return getKeyBaseFromDirWithOpts(rootDir, &opt.Options{ReadOnly: true})
return getKeyBaseFromDirWithOpts(rootDir, nil)
}

func getKeyBaseFromDirWithOpts(rootDir string, o *opt.Options) (keys.Keybase, error) {
Expand Down

0 comments on commit 3657ff4

Please sign in to comment.