Return error on dir create failure from loadConfig.

Rather than simply exiting on a home directory creation error, return the
error so it exits via the normal path.
This commit is contained in:
Dave Collins 2013-11-19 15:56:21 -06:00
parent deb19c2fa3
commit 02e6d47590

View file

@ -190,7 +190,7 @@ func loadConfig() (*config, []string, error) {
err := os.MkdirAll(btcdHomeDir, 0700)
if err != nil {
log.Errorf("%v", err)
os.Exit(-1)
return nil, nil, err
}
// Pre-parse the command line options to see if an alternative config