diff options
author | Eike Rathke <erack@redhat.com> | 2017-09-15 19:58:28 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-09-15 19:59:05 +0200 |
commit | b12e9ec1c9796fe62cb744ac82008146323348ea (patch) | |
tree | 033ca3195b553ff17d310f3eb9d903220fdace8f /tools | |
parent | 8303540b41cb263e7a2517182fe008cbd86639ae (diff) |
Fix INetURLObject::operator==() when comparing paths
Regression from
commit 43a6b59539ad573436f43303e9fbe17c12dc9c84
Date: Mon Jul 10 12:42:24 2017 +0200
simplify some OUString compareTo calls
to either startsWith or == or !=
aPath2.startsWith(aPath1) is not the same as
aPath1.compareTo(aPath2, nLength) == 0
if aPath1 is longer than aPath2 ...
The consequence was a broken Macro Security Trusted Location that never
matched.
Change-Id: I6b7adab42982c020f3677bf24f18edd14210ffdf
Diffstat (limited to 'tools')
-rw-r--r-- | tools/source/fsys/urlobj.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx index ccebbd3f4e2a..ff4914202482 100644 --- a/tools/source/fsys/urlobj.cxx +++ b/tools/source/fsys/urlobj.cxx @@ -3694,7 +3694,7 @@ bool INetURLObject::operator ==(INetURLObject const & rObject) const default: return false; } - return aPath2.startsWith(aPath1); + return aPath1.compareTo(aPath2, nLength) == 0; } default: |