From 5cb8d80bb6ac0f0ae150c61c2de9c19c680fd015 Mon Sep 17 00:00:00 2001 From: Tommi Virtanen <tv@eagain.net> Date: Mon, 16 Mar 2015 13:49:51 -0700 Subject: [PATCH] LevelDB is no longer "the" datastore, adjust identifiers --- repo/fsrepo/fsrepo.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/repo/fsrepo/fsrepo.go b/repo/fsrepo/fsrepo.go index 84664ab5f..9b5d7949c 100644 --- a/repo/fsrepo/fsrepo.go +++ b/repo/fsrepo/fsrepo.go @@ -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 -- GitLab