Merge pull request #412 from alankan-finocomp/patch-1
fix: use `mkdir -p` for creating subdir in mounted base-dir
This commit is contained in:
commit
b3403671f6
@ -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())
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user