File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -336,9 +336,13 @@ function Idm-ExplicitACEsRead {
336336 Force = $true
337337 LiteralPath = $path_spec.path
338338 Recurse = $system_params.recursive
339- Depth = $system_params .recursion_depth
339+ Depth = 0
340340 ErrorAction = ' SilentlyContinue'
341341 }
342+
343+ if ($system_params.recursive ) {
344+ $gci_args.Depth = $system_params.recursion_depth
345+ }
342346
343347 if ($path_spec.depth -ge 0 ) {
344348 $gci_args.Depth = $path_spec.depth
@@ -512,9 +516,13 @@ function Idm-FoldersRead {
512516 Force = $true
513517 LiteralPath = $path_spec.path
514518 Recurse = $system_params.recursive
515- Depth = $system_params .recursion_depth
519+ Depth = 0
516520 ErrorAction = ' SilentlyContinue'
517521 }
522+
523+ if ($system_params.recursive ) {
524+ $gci_args.Depth = $system_params.recursion_depth
525+ }
518526
519527 if ($path_spec.depth -ge 0 ) {
520528 $gci_args.Depth = $path_spec.depth
You can’t perform that action at this time.
0 commit comments