Skip to content

Commit

Permalink
FAB-17752: following review guide
Browse files Browse the repository at this point in the history
Signed-off-by: Shitaibin <hz_stb@163.com>
Change-Id: I9e7aac388418ed9ac9b2cea8c71b1433c7c85d49
  • Loading branch information
Shitaibin authored and denyeart committed Apr 19, 2020
1 parent c403374 commit f27803f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions bccsp/sw/fileks.go
Original file line number Diff line number Diff line change
Expand Up @@ -409,14 +409,13 @@ func (ks *fileBasedKeyStore) createKeyStore() error {
ksPath := ks.path
logger.Debugf("Creating KeyStore at [%s]", ksPath)

err := os.MkdirAll(ksPath, 0755)
if err == nil {
logger.Debugf("KeyStore created at [%s]", ksPath)
} else {
if err := os.MkdirAll(ksPath, 0755); err != nil {
logger.Errorf("Failed creating KeyStore at [%s]: [%s]", ksPath, err.Error())
return err
}

return err
logger.Debugf("KeyStore created at [%s]", ksPath)
return nil
}

func (ks *fileBasedKeyStore) openKeyStore() error {
Expand Down

0 comments on commit f27803f

Please sign in to comment.