Unverified Commit eae7143d by Kubernetes Prow Robot Committed by GitHub

Merge pull request #83 from MiaoZhou/fixEmptyCustomPath

prevent mounting of root directory
parents 888d6dbd b8e20366
......@@ -104,8 +104,10 @@ func (p *nfsProvisioner) Provision(ctx context.Context, options controller.Provi
pathPattern, exists := options.StorageClass.Parameters["pathPattern"]
if exists {
customPath := metadata.stringParser(pathPattern)
path = filepath.Join(p.path, customPath)
fullPath = filepath.Join(mountPath, customPath)
if customPath != "" {
path = filepath.Join(p.path, customPath)
fullPath = filepath.Join(mountPath, customPath)
}
}
glog.V(4).Infof("creating path %s", fullPath)
......
Markdown is supported
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