X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=org.argeo.cms.ui%2Fsrc%2Forg%2Fargeo%2Fcms%2Fui%2Ffs%2FCmsFsBrowser.java;h=8aab1ec21277a4afee48c2c8d78d9599e6076dc9;hb=1d51e20eccc04946705864d447f247018568da69;hp=8562138a96a6341785f4e70a7a1c7b0073f9a699;hpb=2d6bb34c3fa3f9fd4201bfb422e412a555b3dceb;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.cms.ui/src/org/argeo/cms/ui/fs/CmsFsBrowser.java b/org.argeo.cms.ui/src/org/argeo/cms/ui/fs/CmsFsBrowser.java index 8562138a9..8aab1ec21 100644 --- a/org.argeo.cms.ui/src/org/argeo/cms/ui/fs/CmsFsBrowser.java +++ b/org.argeo.cms.ui/src/org/argeo/cms/ui/fs/CmsFsBrowser.java @@ -28,6 +28,7 @@ import org.argeo.eclipse.ui.fs.FsTableViewer; import org.argeo.eclipse.ui.fs.FsUiConstants; import org.argeo.eclipse.ui.fs.FsUiUtils; import org.argeo.eclipse.ui.fs.NioFileLabelProvider; +import org.argeo.jcr.JcrUtils; import org.argeo.node.NodeUtils; import org.eclipse.jface.viewers.DoubleClickEvent; import org.eclipse.jface.viewers.IDoubleClickListener; @@ -93,13 +94,16 @@ public class CmsFsBrowser extends Composite { private final static String NODE_PREFIX = "node://"; private String getCurrentHomePath() { + Session session = null; try { Repository repo = currentBaseContext.getSession().getRepository(); - Session session = CurrentUser.tryAs(() -> repo.login()); + session = CurrentUser.tryAs(() -> repo.login()); String homepath = NodeUtils.getUserHome(session).getPath(); return homepath; } catch (Exception e) { throw new CmsException("Cannot retrieve Current User Home Path", e); + } finally { + JcrUtils.logoutQuietly(session); } }