summaryrefslogtreecommitdiff
path: root/configmgr
diff options
context:
space:
mode:
Diffstat (limited to 'configmgr')
-rw-r--r--configmgr/source/access.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx
index 94a14ce07637..5a3fd7d60aa4 100644
--- a/configmgr/source/access.cxx
+++ b/configmgr/source/access.cxx
@@ -565,14 +565,15 @@ OUString Access::getHierarchicalName() throw (css::uno::RuntimeException) {
checkLocalizedPropertyAccess();
// For backwards compatibility, return an absolute path representation where
// available:
- OUStringBuffer path;
+ OUString rootPath;
rtl::Reference< RootAccess > root(getRootAccess());
if (root.is()) {
- path.append(root->getAbsolutePathRepresentation());
+ rootPath = root->getAbsolutePathRepresentation();
}
OUString rel(getRelativePathRepresentation());
- if (path.getLength() != 0 && !rel.isEmpty()) {
- path.append(sal_Unicode('/'));
+ OUStringBuffer path(rootPath);
+ if (!rootPath.isEmpty() && rootPath != "/" && !rel.isEmpty()) {
+ path.append('/');
}
path.append(rel);
return path.makeStringAndClear();