mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Some minor cleanups. Added a few missing operations to console.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3182 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -153,20 +153,15 @@ class Lookup
|
||||
fComponents.add(comp);
|
||||
fPosition++;
|
||||
// If we are in a write context do copy on write.
|
||||
if (write)
|
||||
if (write && fNeedsCopying)
|
||||
{
|
||||
// Possibly copy.
|
||||
node = node.possiblyCopy(this);
|
||||
if (node == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
// Node was copied.
|
||||
node = node.copy(this);
|
||||
fComponents.get(fPosition).setNode(node);
|
||||
if (fPosition == 0)
|
||||
{
|
||||
// Inform the repository of a new root.
|
||||
fRepository.setNewRoot((DirectoryNode)node);
|
||||
SuperRepository.GetInstance().getSession().flush();
|
||||
return;
|
||||
}
|
||||
// Not the root. Check if we are the top layer and insert this into it's parent.
|
||||
@@ -175,6 +170,7 @@ class Lookup
|
||||
fTopLayer = (LayeredDirectoryNode)node;
|
||||
}
|
||||
((DirectoryNode)fComponents.get(fPosition - 1).getNode()).putChild(name, node);
|
||||
SuperRepository.GetInstance().getSession().flush();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user