summaryrefslogtreecommitdiff
path: root/comphelper/source/misc/storagehelper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'comphelper/source/misc/storagehelper.cxx')
-rw-r--r--comphelper/source/misc/storagehelper.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/comphelper/source/misc/storagehelper.cxx b/comphelper/source/misc/storagehelper.cxx
index 91374b1712a8..7a1498891511 100644
--- a/comphelper/source/misc/storagehelper.cxx
+++ b/comphelper/source/misc/storagehelper.cxx
@@ -446,16 +446,13 @@ bool OStorageHelper::PathHasSegment( const OUString& aPath, const OUString& aSeg
if ( !aSegment.isEmpty() && nPathLen >= nSegLen )
{
- OUString aEndSegment = "/"
- + aSegment;
-
- OUString aInternalSegment = aEndSegment
- + "/";
+ OUString aEndSegment = "/" + aSegment;
+ OUString aInternalSegment = aEndSegment + "/";
if ( aPath.indexOf( aInternalSegment ) >= 0 )
bResult = true;
- if ( !bResult && !aPath.compareTo( aSegment, nSegLen ) )
+ if ( !bResult && aPath.startsWith( aSegment ) )
{
if ( nPathLen == nSegLen || aPath[nSegLen] == '/' )
bResult = true;