Force PEP parent node to be []

SVN Revision: 1144
This commit is contained in:
Christophe Romain 2008-01-10 17:38:24 +00:00
parent 3225edde24
commit 09fa4a0ca7
1 changed files with 5 additions and 1 deletions

View File

@ -144,11 +144,15 @@ create_node(Key, Node, Type, Owner, Options) ->
{[], true};
_ ->
Parent = lists:sublist(Node, length(Node) - 1),
(Parent == []) orelse
case Parent of
[] ->
{[], true};
_ ->
case mnesia:read({pubsub_node, {Key, Parent}}) of
[] -> {Parent, false};
_ -> {Parent, true}
end
end
end,
case ParentExists of
true ->