|
|
@ -387,8 +387,11 @@ Elseif (Test-Path $dest) {
|
|
|
|
$found = $FALSE;
|
|
|
|
$found = $FALSE;
|
|
|
|
Foreach ($encoding in $sortedlist.GetValueList()) {
|
|
|
|
Foreach ($encoding in $sortedlist.GetValueList()) {
|
|
|
|
$preamble = $encoding.GetPreamble();
|
|
|
|
$preamble = $encoding.GetPreamble();
|
|
|
|
If ($preamble) {
|
|
|
|
If ($preamble -and $bom) {
|
|
|
|
Foreach ($i in 0..$preamble.Length) {
|
|
|
|
Foreach ($i in 0..($preamble.Length - 1)) {
|
|
|
|
|
|
|
|
If ($i -ge $bom.Length) {
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
If ($preamble[$i] -ne $bom[$i]) {
|
|
|
|
If ($preamble[$i] -ne $bom[$i]) {
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -427,7 +430,7 @@ If ($state -eq "present") {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Else {
|
|
|
|
Else {
|
|
|
|
|
|
|
|
|
|
|
|
If ($regex -eq $FALSE -and $line -eq $FALSE) {
|
|
|
|
If ($regexp -eq $FALSE -and $line -eq $FALSE) {
|
|
|
|
Fail-Json (New-Object psobject) "one of line= or regexp= is required with state=absent";
|
|
|
|
Fail-Json (New-Object psobject) "one of line= or regexp= is required with state=absent";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|