Commit 2bc684ee authored by Christopher Ferris's avatar Christopher Ferris Committed by Gerrit Code Review
Browse files

Merge "[FAB-10170] Check mspMgrConfigDir is Dir"

parents d6ba31b6 6db89d79
......@@ -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