Fixed U4-703 - Updating or re-installing package causes duplicate trees
This commit is contained in:
@@ -260,6 +260,10 @@ namespace umbraco.BusinessLogic
|
||||
|
||||
LoadXml(doc =>
|
||||
{
|
||||
var el = doc.Root.Elements("add").SingleOrDefault(x => x.Attribute("alias").Value == alias && x.Attribute("application").Value == applicationAlias);
|
||||
|
||||
if (el == null)
|
||||
{
|
||||
doc.Root.Add(new XElement("add",
|
||||
new XAttribute("silent", silent),
|
||||
new XAttribute("initialize", initialize),
|
||||
@@ -272,6 +276,7 @@ namespace umbraco.BusinessLogic
|
||||
new XAttribute("assembly", assemblyName),
|
||||
new XAttribute("type", type),
|
||||
new XAttribute("action", string.IsNullOrEmpty(action) ? "" : action)));
|
||||
}
|
||||
}, true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user