Skip to content
Snippets Groups Projects
Commit 9362c0fb authored by Hans Moog's avatar Hans Moog
Browse files

Fix: fixed wrong database folder

parent f87db322
No related branches found
No related tags found
No related merge requests found
package database
import (
"fmt"
"os"
"path/filepath"
"sync"
"github.com/dgraph-io/badger"
......@@ -18,10 +16,7 @@ func GetBadgerInstance() (result *badger.DB, err error) {
openLock.Lock()
if instance == nil {
directory := filepath.Dir(*DIRECTORY.Value)
fmt.Println(directory)
fmt.Println("huhu")
directory := *DIRECTORY.Value
if _, osErr := os.Stat(directory); os.IsNotExist(osErr) {
if osErr := os.Mkdir(directory, 0700); osErr != nil {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment