mirror of
https://github.com/go-i2p/go-i2cp.git
synced 2025-06-10 09:40:43 -04:00
ignore non-present config file and assume default values
This commit is contained in:
@ -5,6 +5,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"regexp"
|
"regexp"
|
||||||
"time"
|
"time"
|
||||||
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
type SessionConfigProperty int
|
type SessionConfigProperty int
|
||||||
@ -139,7 +140,9 @@ func (config *SessionConfig) SetProperty(prop SessionConfigProperty, value strin
|
|||||||
func ParseConfig(s string, cb func(string, string)) {
|
func ParseConfig(s string, cb func(string, string)) {
|
||||||
file, err := os.Open(s)
|
file, err := os.Open(s)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if !strings.Contains(err.Error(), "no such file") {
|
||||||
Error(SESSION_CONFIG, err.Error())
|
Error(SESSION_CONFIG, err.Error())
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
Debug(SESSION_CONFIG, "Parsing config file '%s'", s)
|
Debug(SESSION_CONFIG, "Parsing config file '%s'", s)
|
||||||
|
Reference in New Issue
Block a user