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

View file

@ -5,7 +5,6 @@ import (
"encoding/base64"
"errors"
"log"
"path/filepath"
)
type PassConfig struct {
@ -68,12 +67,5 @@ func LoadConfig(filename string) (config *Config, err error) {
err = errors.New("server.listen missing")
return
}
// make
dir := filepath.Dir(filename)
if config.Server.MOTD != "" {
config.Server.MOTD = filepath.Join(dir, config.Server.MOTD)
}
config.Server.Database = filepath.Join(dir, config.Server.Database)
return
}