Skip to content

Commit

Permalink
Merge pull request #42 from gedge/fix-config-path
Browse files Browse the repository at this point in the history
set path to Sprintf return value
  • Loading branch information
bcicen authored Apr 24, 2017
2 parents 41787f2 + b121f52 commit a00d195
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func (c *Config) Write(path string) {
if _, err := os.Stat(cfgdir); err != nil {
err = os.Mkdir(cfgdir, 0755)
if err != nil {
exitErr(fmt.Errorf("failed to initialize config dir: %s", err))
exitErr(fmt.Errorf("failed to initialize config dir [%s]: %s", cfgdir, err))
}
}

Expand Down Expand Up @@ -101,7 +101,7 @@ func getConfigPath() (path string, exists bool) {
}
path = fmt.Sprintf("%s/slackcat/config", xdgHome)
} else {
fmt.Sprintf("%s/.slackcat", userHome)
path = fmt.Sprintf("%s/.slackcat", userHome)
}

if _, err := os.Stat(path); err == nil {
Expand Down

0 comments on commit a00d195

Please sign in to comment.