Fix error handling

parent e200c089
......@@ -63,7 +63,12 @@ func PathRoot() (string, error) {
func Path(configroot, extension string) (string, error) {
if len(configroot) == 0 {
dir, err := PathRoot()
return filepath.Join(dir, extension), err
if err != nil {
return "", err
} else {
return filepath.Join(dir, extension), nil
}
} else {
return filepath.Join(configroot, extension), nil
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment