Kaydet (Commit) bd8b3be0 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Do not create paths starting "//" when root is just "/"

Change-Id: If0b413a4fdd93465074548c7ea5451288c1d12aa
üst 7468f9b7
...@@ -543,13 +543,14 @@ OUString Access::getHierarchicalName() throw (css::uno::RuntimeException) { ...@@ -543,13 +543,14 @@ OUString Access::getHierarchicalName() throw (css::uno::RuntimeException) {
checkLocalizedPropertyAccess(); checkLocalizedPropertyAccess();
// For backwards compatibility, return an absolute path representation where // For backwards compatibility, return an absolute path representation where
// available: // available:
OUStringBuffer path; OUString rootPath;
rtl::Reference< RootAccess > root(getRootAccess()); rtl::Reference< RootAccess > root(getRootAccess());
if (root.is()) { if (root.is()) {
path.append(root->getAbsolutePathRepresentation()); rootPath = root->getAbsolutePathRepresentation();
} }
OUString rel(getRelativePathRepresentation()); OUString rel(getRelativePathRepresentation());
if (!path.isEmpty() && !rel.isEmpty()) { OUStringBuffer path(rootPath);
if (!rootPath.isEmpty() && rootPath != "/" && !rel.isEmpty()) {
path.append('/'); path.append('/');
} }
path.append(rel); path.append(rel);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment