summaryrefslogtreecommitdiff
path: root/configmgr
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-12-06 16:52:27 +0100
committerAndras Timar <andras.timar@collabora.com>2013-12-08 21:40:11 +0100
commit6407e1a18304b8cf9a003824777b290b78eb0210 (patch)
tree989cf392b721a69f4ca72f549509a1e0b70e5214 /configmgr
parentf58941760aa88eb155a2eb7fe39f0ee68265fdb2 (diff)
Do not create paths starting "//" when root is just "/"
(cherry picked from commit bd8b3be0c7535e74ca8b63969be5c2bece0d3a3b) Conflicts: configmgr/source/access.cxx Change-Id: If0b413a4fdd93465074548c7ea5451288c1d12aa Reviewed-on: https://gerrit.libreoffice.org/6961 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
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();