mirror of
https://github.com/jeremyd/ergo.git
synced 2026-06-06 05:01:54 -07:00
chdir instead of relativizing paths in config
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user