diff --git a/src/main/java/org/olat/core/gui/control/generic/folder/FolderTreeModel.java b/src/main/java/org/olat/core/gui/control/generic/folder/FolderTreeModel.java index 9557d18fdd36959d445fcce795c394232c45c6d3..79351f015aec4e505944c01dfd049bfb3ae89df8 100644 --- a/src/main/java/org/olat/core/gui/control/generic/folder/FolderTreeModel.java +++ b/src/main/java/org/olat/core/gui/control/generic/folder/FolderTreeModel.java @@ -75,16 +75,11 @@ public class FolderTreeModel extends GenericTreeModel { this.selectableFolders = selectableFolders; this.fileFilter = fileFilter; - GenericTreeNode newRoot = new GenericTreeNode(rootContainer.getName(), rootContainer.getName()); + GenericTreeNode newRoot = new GenericTreeNode(rootContainer.getName(), "/"); newRoot.setIconCssClass("o_filetype_folder"); + newRoot.setSelected(allowRootFolderSelect); setRootNode(newRoot); - if (allowRootFolderSelect) { // include root folder as selection - GenericTreeNode effectiveRoot = new GenericTreeNode("/", "/"); - newRoot.addChild(effectiveRoot); - buildTree(effectiveRoot, rootContainer, "/"); - } else { - buildTree(getRootNode(), rootContainer, "/"); - } + buildTree(newRoot, rootContainer, "/"); } /**