Fix applied for error: 'can not delete object when containing leaf objects'
This commit is contained in:
parent
e9d04fdcbd
commit
afab892ffe
1 changed files with 3 additions and 0 deletions
|
@ -102,10 +102,13 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
DirectoryEntry entry = GetADObject(path);
|
DirectoryEntry entry = GetADObject(path);
|
||||||
|
|
||||||
if (removeChild && entry.Children != null)
|
if (removeChild && entry.Children != null)
|
||||||
|
{
|
||||||
foreach (DirectoryEntry child in entry.Children)
|
foreach (DirectoryEntry child in entry.Children)
|
||||||
{
|
{
|
||||||
entry.Children.Remove(child);
|
entry.Children.Remove(child);
|
||||||
}
|
}
|
||||||
|
entry.CommitChanges();
|
||||||
|
}
|
||||||
|
|
||||||
DirectoryEntry parent = entry.Parent;
|
DirectoryEntry parent = entry.Parent;
|
||||||
if (parent != null)
|
if (parent != null)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue