fix panic

This commit is contained in:
mzz2017 2023-02-07 23:05:30 +08:00
parent 04702fd99a
commit 81676674c8

View File

@ -95,7 +95,7 @@ func NewControlPlane(
return nil, fmt.Errorf("rlimit.RemoveMemlock:%v", err)
}
pinPath := filepath.Join(consts.BpfPinRoot, consts.AppName)
if err := os.MkdirAll(pinPath, 0755); !os.IsExist(err) {
if err = os.MkdirAll(pinPath, 0755); err != nil && !os.IsExist(err) {
return nil, err
}