Skip to content

Commit f995bdf

Browse files
authored
Update File System.ps1
Changed Folder Update to only Rename the Folder and updated logic to properly update the "Name" field in the System Table.
1 parent c08cf88 commit f995bdf

1 file changed

Lines changed: 5 additions & 11 deletions

File tree

File System.ps1

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -586,9 +586,7 @@ function Idm-FolderUpdate {
586586
semantics = 'update'
587587
parameters = @(
588588
@{ name = 'FullName'; allowance = 'mandatory' }
589-
@{ name = 'InheritanceEnable'; allowance = 'optional' }
590-
#@{ name = 'Owner'; allowance = 'optional' }
591-
@{ name = 'Path'; allowance = 'optional' }
589+
@{ name = 'Name'; allowance = 'mandatory' }
592590

593591
foreach ($nr in 1..$Global:NrOfAccessProfiles) {
594592
$prefix = "access_profile_$($nr)_"
@@ -612,15 +610,11 @@ function Idm-FolderUpdate {
612610

613611
$full_name = $function_params.FullName
614612

615-
if ($function_params.ContainsKey('Path')) {
616-
LogIO info "Rename-Item" -In -LiteralPath $function_params.FullName -Destination $function_params.Path
617-
$rv = Rename-Item -PassThru -LiteralPath $function_params.FullName -NewName $function_params.Path | Select-Object -Property @{ Name = 'FullName'; Expression = {$_.FullName.TrimEnd('\')} }
618-
LogIO info "Rename-Item" -Out $rv
619-
620-
$full_name = $rv.FullName
621-
}
613+
LogIO info "Rename-Item" -In -LiteralPath $function_params.FullName -Destination $function_params.Name
614+
$rv = Rename-Item -PassThru -LiteralPath $function_params.FullName -NewName $function_params.Name | Select-Object -Property @{ Name = 'FullName'; Expression = {$_.FullName.TrimEnd('\')} }
615+
LogIO info "Rename-Item" -Out $rv
622616

623-
ModifyFileSecurityDescriptor $system_params $function_params $full_name
617+
$function_params
624618
}
625619

626620
Log info "Done"

0 commit comments

Comments
 (0)