Make the config's full directory path (#160)

This commit is contained in:
Daniel Marquard 2016-06-27 00:55:26 -04:00 committed by Matthieu Grieger
parent 8c61ca2d6f
commit 57eaf7c3db

View file

@ -199,7 +199,7 @@ func createConfigWhenNotExists() {
logrus.Warnln("An error occurred while accessing config binary data. A new config file will not be written.") logrus.Warnln("An error occurred while accessing config binary data. A new config file will not be written.")
} else { } else {
filePath := os.ExpandEnv("$HOME/.config/mumbledj/config.yaml") filePath := os.ExpandEnv("$HOME/.config/mumbledj/config.yaml")
os.Mkdir(os.ExpandEnv("$HOME/.config/mumbledj"), 0777) os.MkdirAll(os.ExpandEnv("$HOME/.config/mumbledj"), 0777)
writeErr := ioutil.WriteFile(filePath, configFile, 0644) writeErr := ioutil.WriteFile(filePath, configFile, 0644)
if writeErr == nil { if writeErr == nil {
logrus.WithFields(logrus.Fields{ logrus.WithFields(logrus.Fields{