|
|
|
@ -321,15 +321,25 @@ public class UserManager {
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
Node workspaceNode = session.getNode(workspacePath.toPath());
|
|
|
|
|
Node homeNode = session.getNode(homePath.toPath());
|
|
|
|
|
Node trashNode = session.getNode(trashPath.toPath());
|
|
|
|
|
List<Item> workspaceItems = Utils.getItemList(workspaceNode, Excludes.GET_ONLY_CONTENT, null, true, null).stream().filter(i -> !i.isShared()).collect(Collectors.toList());
|
|
|
|
|
trashHandler.removeOnlyNodesContent(session, workspaceItems);
|
|
|
|
|
List<Item> itemsToDelete = Utils.getItemList(trashNode, Excludes.ALL, null, true, null);
|
|
|
|
|
trashHandler.removeOnlyNodesContent(session, itemsToDelete);
|
|
|
|
|
} catch (PathNotFoundException e) {
|
|
|
|
|
log.warn("{} workspace dir {} was already deleted", user, homePath.toPath());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
Node trashNode = session.getNode(trashPath.toPath());
|
|
|
|
|
List<Item> trashItems = Utils.getItemList(trashNode, Excludes.ALL, null, true, null);
|
|
|
|
|
trashHandler.removeOnlyNodesContent(session, trashItems);
|
|
|
|
|
} catch (PathNotFoundException e) {
|
|
|
|
|
log.warn("{} trash dir {} was already deleted", user, homePath.toPath());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
Node homeNode = session.getNode(homePath.toPath());
|
|
|
|
|
homeNode.remove();
|
|
|
|
|
} catch (PathNotFoundException e) {
|
|
|
|
|
log.warn("{} home dir was already deleted", user);
|
|
|
|
|
log.warn("{} home dir {} was already deleted", user, homePath.toPath());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|