Skip to content

Commit

Permalink
Merge pull request #412 from alankan-finocomp/patch-1
Browse files Browse the repository at this point in the history
fix: use `mkdir -p` for creating subdir in mounted base-dir
  • Loading branch information
k8s-ci-robot committed Feb 13, 2023
2 parents 9210d20 + 1c935b2 commit b340367
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/nfs/controllerserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func (cs *ControllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol

// Create subdirectory under base-dir
internalVolumePath := getInternalVolumePath(cs.Driver.workingMountDir, nfsVol)
if err = os.Mkdir(internalVolumePath, 0777); err != nil && !os.IsExist(err) {
if err = os.MkdirAll(internalVolumePath, 0777); err != nil {
return nil, status.Errorf(codes.Internal, "failed to make subdirectory: %v", err.Error())
}

Expand Down

0 comments on commit b340367

Please sign in to comment.