Commit 6db89d79 authored by Zhenguo Niu's avatar Zhenguo Niu Committed by Gari Singh
Browse files

[FAB-10170] Check mspMgrConfigDir is Dir

This tries to check whether mspMgrConfigDir is a Dir instead
of just existing.

Change-Id: Ifb9f52e7d88c5f2b74e4c47390bc71116f6db61e
Signed-off-by: default avatarZhenguo Niu <>
parent 71983e8b
......@@ -100,8 +100,8 @@ func InitConfig(cmdRoot string) error {
func InitCrypto(mspMgrConfigDir, localMSPID, localMSPType string) error {
var err error
// Check whether msp folder exists
_, err = os.Stat(mspMgrConfigDir)
if os.IsNotExist(err) {
fi, err := os.Stat(mspMgrConfigDir)
if os.IsNotExist(err) || !fi.IsDir() {
// No need to try to load MSP from folder which is not available
return errors.Errorf("cannot init crypto, missing %s folder", mspMgrConfigDir)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment