JCRVLT-830 check if a subfolder can be removed#416
Conversation
vault-core/src/main/java/org/apache/jackrabbit/vault/fs/api/WorkspaceFilter.java
Outdated
Show resolved
Hide resolved
vault-core/src/main/java/org/apache/jackrabbit/vault/fs/api/WorkspaceFilter.java
Show resolved
Hide resolved
| return false; | ||
| } | ||
| } | ||
| NodeIterator children = node.getNodes(); |
There was a problem hiding this comment.
For performance reason I wouldn't iterate over all properties/children from the repo but just over all filter rules. That is enough to determine the outcome and should be way faster....
There was a problem hiding this comment.
ok, so you mean, that if the node is not affected, any childnode of it (and their properties) cannot be affected as well?
There was a problem hiding this comment.
A filter without includes/excludes always covers everything below
There was a problem hiding this comment.
And what about a filter with includes and excludes? In that case we would need to iterate down the tree...
(given the frequency at which filters without includes and excludes occur, I can definitely add a shortcut without repo access.)
|
I made this feature configurable via OSGI. That should be only a temporary measure until we are sure that there are no side-effects. But it required a series of changes to otherwise unrelated classes to pass on that flag. I added the OSGI property to both the FSPackageRegistry and the JcrPackageRegistry. Default is to have this feature enabled. |
Implemented some additional checks to prevent the removal of unexpected files.