We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 84fbb95 commit c04c6b4Copy full SHA for c04c6b4
pkg/server/server.go
@@ -367,9 +367,10 @@ func (s *ImmuServer) loadUserDatabases(dataDir string) error {
367
for _, val := range dirs {
368
//dbname is the directory name where it is stored
369
//path iteration above stores the directories as data/db_name
370
- pathparts := strings.Split(val, "/")
+ pathparts := strings.Split(val, string(filepath.Separator))
371
dbname := pathparts[len(pathparts)-1]
372
- op := DefaultOption().WithDbName(dbname).WithCorruptionChecker(s.Options.CorruptionCheck).WithDbRootPath(s.Options.Dir)
+ op := DefaultOption().WithDbName(dbname).WithDbRootPath(dataDir).
373
+ WithCorruptionChecker(s.Options.CorruptionCheck).WithDbRootPath(s.Options.Dir)
374
db, err := OpenDb(op, s.Logger)
375
if err != nil {
376
return err
0 commit comments