chdir instead of relativizing paths in config

This commit is contained in:
Jeremy Latt
2014-03-01 21:51:52 -08:00
parent 6d194e3d94
commit 22c1cfdc3e
2 changed files with 5 additions and 8 deletions
+5
View File
@@ -10,6 +10,7 @@ import (
_ "github.com/mattn/go-sqlite3"
"log"
"os"
"path/filepath"
)
func genPasswd(passwd string) {
@@ -57,6 +58,10 @@ func main() {
if err != nil {
log.Fatal(err)
}
err = os.Chdir(filepath.Dir(*conf))
if err != nil {
log.Fatal(err)
}
if *initdb {
initDB(config)