Commit 5cb8d80b authored by Tommi Virtanen's avatar Tommi Virtanen Committed by Juan Batiz-Benet

LevelDB is no longer "the" datastore, adjust identifiers

parent 7eb4a92a
......@@ -25,7 +25,7 @@ import (
)
const (
defaultDataStoreDirectory = "datastore"
leveldbDirectory = "datastore"
)
var (
......@@ -190,8 +190,8 @@ func Init(repoPath string, conf *config.Config) error {
// The actual datastore contents are initialized lazily when Opened.
// During Init, we merely check that the directory is writeable.
p := path.Join(repoPath, defaultDataStoreDirectory)
if err := dir.Writable(p); err != nil {
leveldbPath := path.Join(repoPath, leveldbDirectory)
if err := dir.Writable(leveldbPath); err != nil {
return fmt.Errorf("datastore: %s", err)
}
......@@ -236,8 +236,8 @@ func (r *FSRepo) openConfig() error {
// openDatastore returns an error if the config file is not present.
func (r *FSRepo) openDatastore() error {
dsPath := path.Join(r.path, defaultDataStoreDirectory)
ds, err := levelds.NewDatastore(dsPath, &levelds.Options{
leveldbPath := path.Join(r.path, leveldbDirectory)
ds, err := levelds.NewDatastore(leveldbPath, &levelds.Options{
Compression: ldbopts.NoCompression,
})
if err != nil {
......@@ -430,7 +430,7 @@ func isInitializedUnsynced(repoPath string) bool {
if !configIsInitialized(repoPath) {
return false
}
if !util.FileExists(path.Join(repoPath, defaultDataStoreDirectory)) {
if !util.FileExists(path.Join(repoPath, leveldbDirectory)) {
return false
}
return true
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment