tools/source/fsys/urlobj.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit b12e9ec1c9796fe62cb744ac82008146323348ea Author: Eike Rathke <[email protected]> Date: Fri Sep 15 19:58:28 2017 +0200 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 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: _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
