Skip to content

Commit e300c7f

Browse files
committed
<DATA> was wrongly wrapped in <ARRAY>
1 parent 7b48050 commit e300c7f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ConvertTo-PList.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,21 +94,21 @@ function ConvertTo-PList ($PropertyList, [string]$indent) {
9494
}
9595
if ($item -is [array]) {
9696
# handle arrays
97-
"$level<array>"
9897
if ($item -is [byte[]]) {
99-
# handle an array of bytes, encode as BASE64 string, store as DATA block
98+
# handle an array of bytes, encode as BASE64 string, write as DATA block
10099
# use REGEX to split out the string in to 44 character chunks properly indented
101-
"$level$indent<data>"
100+
"$level<data>"
102101
[regex]::Matches([convert]::ToBase64String($item), '(.{1,44})').value.foreach( {"$level$indent$_"} )
103-
"$level$indent</data>"
102+
"$level</data>"
104103
}
105104
else {
105+
"$level<array>"
106106
# iterate through the items in the array
107107
foreach ($subitem in $item) {
108108
writevalue $subitem "$level$indent"
109109
}
110+
"$level</array>"
110111
}
111-
"$level</array>"
112112
}
113113
else {
114114
# handle a single object

0 commit comments

Comments
 (0)