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:
Britt Park
2006-06-22 00:49:10 +00:00
parent 1318a5204b
commit 91e39c8fd6
8 changed files with 77 additions and 33 deletions

View File

@@ -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();
}
}