Skip to content

Commit

Permalink
Merge pull request prometheus#2278 from prometheus/beorn7/style
Browse files Browse the repository at this point in the history
storage: Fix linter issue
beorn7 authored Dec 13, 2016
2 parents 568fd8a + 837c029 commit a4c8292
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions storage/local/persistence.go
Original file line number Diff line number Diff line change
@@ -154,11 +154,10 @@ func newPersistence(
// empty. If not, we have found an old storage directory without
// version file, so we have to bail out.
if err := os.MkdirAll(basePath, 0700); err != nil {
if abspath, e := filepath.Abs(basePath); e != nil {
return nil, fmt.Errorf("cannot create persistent directory %s: %s", basePath, err)
} else {
if abspath, e := filepath.Abs(basePath); e == nil {
return nil, fmt.Errorf("cannot create persistent directory %s: %s", abspath, err)
}
return nil, fmt.Errorf("cannot create persistent directory %s: %s", basePath, err)
}
fis, err := ioutil.ReadDir(basePath)
if err != nil {

0 comments on commit a4c8292

Please sign in to comment.