summaryrefslogtreecommitdiff
path: root/configmgr
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-12-06 16:52:27 +0100
committerStephan Bergmann <sbergman@redhat.com>2013-12-06 17:06:56 +0100
commit50d9e9e59fdd38ec8e24ac0f844015080bbcd36f (patch)
tree5aa183449ddd875e6c46e5b8a51d6443e5775356 /configmgr
parenta176f564883b3bfd16fbf1750d46521d4a491dc2 (diff)
Do not create paths starting "//" when root is just "/"
Change-Id: If0b413a4fdd93465074548c7ea5451288c1d12aa (cherry picked from commit bd8b3be0c7535e74ca8b63969be5c2bece0d3a3b)
Diffstat (limited to 'configmgr')
-rw-r--r--configmgr/source/access.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx
index 280f053c7f36..a6a80350edb1 100644
--- a/configmgr/source/access.cxx
+++ b/configmgr/source/access.cxx
@@ -543,13 +543,14 @@ 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.isEmpty() && !rel.isEmpty()) {
+ OUStringBuffer path(rootPath);
+ if (!rootPath.isEmpty() && rootPath != "/" && !rel.isEmpty()) {
path.append('/');
}
path.append(rel);