mirror of
https://github.com/Kopano-dev/kopano-ol-extension.git
synced 2023-10-10 13:37:40 +02:00
Exception while loading shared folder tree nodes is now logged. Any nodes whose parents are missing are silently ignored.
This commit is contained in:
parent
e9ec0cd855
commit
5daff1dc44
@ -107,6 +107,7 @@ namespace Acacia.Controls
|
||||
}, true)
|
||||
.OnError(error =>
|
||||
{
|
||||
Logger.Instance.Error(this, "Exception while fetching child nodes: {0}", error);
|
||||
// On error return an empty node list
|
||||
State = LoadingState.Error;
|
||||
return new KTreeNodes(node);
|
||||
|
@ -96,10 +96,13 @@ namespace Acacia.ZPush.API.SharedFolders
|
||||
rootNodes.Add(folder);
|
||||
parent = null;
|
||||
}
|
||||
else if (!foldersByServerId.ContainsKey(folder.ParentId))
|
||||
{
|
||||
// Ignore the node if the parent is not available
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!foldersByServerId.ContainsKey(folder.ParentId))
|
||||
throw new Exception("Missing parent folder: " + folder.ParentId);
|
||||
parent = foldersByServerId[folder.ParentId];
|
||||
parent.Children.Add(folder);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user