Skip to content

Conversation

@vishen
Copy link

@vishen vishen commented May 5, 2017

The following was not working for me because of the way libkv handles the path for BoltDB

kv, err := libkv.NewStore(
	store.BOLTDB,
	[]string{"__boltdbtest"},
	&store.Config{
		Bucket: "boltDBTest",
	},
)

I would get the following error because when libkv attempts to create the BoltDB path: mkdir : no such file or directory - It uses https://godoc.org/path/filepath#Split which can return an empty string for dir.

This PR checks if the dir is not an empty string before calling os.MkdirAll(dir, 0750).

@GordonTheTurtle
Copy link

Please sign your commits following these rules:
https://github.com/moby/moby/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:

$ git clone -b "master" [email protected]:vishen/libkv.git somewhere
$ cd somewhere
$ git commit --amend -s --no-edit
$ git push -f

Amending updates the existing PR. You DO NOT need to open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants