forked from solderpunk/molly-brown
Broader config file error handling.
This commit is contained in:
parent
54f659c03f
commit
3c4c447bd3
2
main.go
2
main.go
|
@ -17,7 +17,7 @@ func main() {
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
if conf_file == "" {
|
if conf_file == "" {
|
||||||
_, err := os.Stat("/etc/molly.conf")
|
_, err := os.Stat("/etc/molly.conf")
|
||||||
if !os.IsNotExist(err) {
|
if err == nil {
|
||||||
conf_file = "/etc/molly.conf"
|
conf_file = "/etc/molly.conf"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue