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