lib/db: Remove Badger experiment (#7413)
This commit is contained in:
@@ -47,7 +47,6 @@ const (
|
||||
UserHomeBaseDir BaseDirEnum = "userHome"
|
||||
|
||||
LevelDBDir = "index-v0.14.0.db"
|
||||
BadgerDir = "indexdb.badger"
|
||||
)
|
||||
|
||||
// Platform dependent directories
|
||||
@@ -160,16 +159,9 @@ func defaultDataDir(userHome, config string) string {
|
||||
|
||||
default:
|
||||
// If a database exists at the "normal" location, use that anyway.
|
||||
// We look for both LevelDB and Badger variants here regardless of
|
||||
// what we're currently configured to use, because we might be
|
||||
// starting up in Badger mode with only a LevelDB database present
|
||||
// (will be converted), or vice versa.
|
||||
if _, err := os.Lstat(filepath.Join(config, LevelDBDir)); err == nil {
|
||||
return config
|
||||
}
|
||||
if _, err := os.Lstat(filepath.Join(config, BadgerDir)); err == nil {
|
||||
return config
|
||||
}
|
||||
// Always use this env var, as it's explicitly set by the user
|
||||
if xdgHome := os.Getenv("XDG_DATA_HOME"); xdgHome != "" {
|
||||
return filepath.Join(xdgHome, "syncthing")
|
||||
|
||||
Reference in New Issue
Block a user