Skip to content

Commit 5572dbb

Browse files
committed
#478 : Fixed issue where the source name is missing.
1 parent 9df4388 commit 5572dbb

File tree

1 file changed

+10
-4
lines changed
  • Cognifide.PowerShell/Data/serialization/master/sitecore/system/Modules/PowerShell/Script Library/Package Generator/Toolbox

1 file changed

+10
-4
lines changed

Cognifide.PowerShell/Data/serialization/master/sitecore/system/Modules/PowerShell/Script Library/Package Generator/Toolbox/Create Anti-Package.item

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ templatekey: PowerShell Script
1313
field: {B1A94FF0-6897-47C0-9C51-AA6ACB80B1F0}
1414
name: Script
1515
key: script
16-
content-length: 8316
16+
content-length: 8538
1717

1818
$response = Show-ModalDialog -HandleParameters @{
1919
"h"="Create an Anti-Package";
@@ -157,6 +157,12 @@ foreach($source in $project.Sources) {
157157
$isFileSource = $sourceTypeName -like "*FileSource"
158158
$isExplicit = "ExplicitItemSource","ExplicitFileSource" -contains $sourceTypeName
159159

160+
if([string]::IsNullOrEmpty($source.Name)) {
161+
$guid = [guid]::NewGuid().ToString()
162+
Write-Verbose "Changing the source name to $($guid) because it's missing."
163+
$source.Name = $guid
164+
}
165+
160166
Write-Verbose "Processing $($sourceTypeName) : $($source.Name)"
161167
if($isExplicit) {
162168
foreach($entry in $source.Entries) {
@@ -257,7 +263,7 @@ People/32x32/package_delete.png
257263
----version----
258264
language: en
259265
version: 1
260-
revision: 12aad2a7-ed38-4697-98b2-e0f27306204d
266+
revision: e02463d4-a856-433a-8d62-6831e92557dd
261267

262268
----field----
263269
field: {25BED78C-4957-4165-998A-CA1B52F67497}
@@ -272,14 +278,14 @@ name: __Revision
272278
key: __revision
273279
content-length: 36
274280

275-
12aad2a7-ed38-4697-98b2-e0f27306204d
281+
e02463d4-a856-433a-8d62-6831e92557dd
276282
----field----
277283
field: {D9CF14B1-FA16-4BA6-9288-E8A174D4D522}
278284
name: __Updated
279285
key: __updated
280286
content-length: 34
281287

282-
20150831T200448:635766482881500294
288+
20150901T153850:635767187305022386
283289
----field----
284290
field: {BADD9CF9-53E0-4D0C-BCC0-2D784C282F6A}
285291
name: __Updated by

0 commit comments

Comments
 (0)