diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-12-06 16:52:27 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-12-06 16:53:55 +0100 |
commit | bd8b3be0c7535e74ca8b63969be5c2bece0d3a3b (patch) | |
tree | 9bf877d663342e9849dffe8f4b6e1d2182e23c19 /configmgr | |
parent | 7468f9b773d5a9a4cb3af57cf123c2a0e7e937fd (diff) |
Do not create paths starting "//" when root is just "/"
Change-Id: If0b413a4fdd93465074548c7ea5451288c1d12aa
Diffstat (limited to 'configmgr')
-rw-r--r-- | configmgr/source/access.cxx | 7 |
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); |