os.MkallDir now just makes directories

This commit is contained in:
asdf 2019-12-04 19:18:01 +11:00
parent 217b069172
commit 637c23d4cc
1 changed files with 3 additions and 3 deletions

View File

@ -94,12 +94,12 @@ func lowerCaseOpt(opt, val string) string {
}
func loadConfig() error {
fp := filepath.Join(bombadillo.Options["configlocation"], ".bombadillo.ini")
err := os.MkdirAll(fp, 0755)
err := os.MkdirAll(bombadillo.Options["configlocation"], 0755)
if err != nil {
return fmt.Errorf("configlocation cannot be written to or is invalid")
return fmt.Errorf("Error creating configlocation: %s", err.Error())
}
fp := filepath.Join(bombadillo.Options["configlocation"], ".bombadillo.ini")
file, err := os.Open(fp)
if err != nil {
err = saveConfig()