summaryrefslogtreecommitdiff
path: root/stoc
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-07-08 15:02:31 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-07-10 08:09:00 +0000
commit54013188b24a1a02491a2853f731461253065424 (patch)
tree45078e1deb8bdfdde79a431daa81fde7c47621ad /stoc
parentfd2749455fe25e24b448a44f9ada6113e5ac0d13 (diff)
cleanup some unnecessary direct usage of the OString/OUString C API.
Change-Id: I6edee95aae1c169ce70063562a0c1b287e0c4735 Reviewed-on: https://gerrit.libreoffice.org/16861 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'stoc')
-rw-r--r--stoc/source/security/permissions.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/stoc/source/security/permissions.cxx b/stoc/source/security/permissions.cxx
index d6f0f793ef9a..21397f9a5b34 100644
--- a/stoc/source/security/permissions.cxx
+++ b/stoc/source/security/permissions.cxx
@@ -380,8 +380,7 @@ bool FilePermission::implies( Permission const & perm ) const
if (m_url.getLength() > demanded.m_url.getLength())
return false;
// check /- wildcard: all files and recursive in that path
- if (1 < m_url.getLength() &&
- 0 == ::rtl_ustr_ascii_compare_WithLength( m_url.getStr() + m_url.getLength() - 2, 2, "/-" ))
+ if (m_url.endsWith("/-"))
{
// demanded url must start with granted path (including path trailing path sep)
sal_Int32 len = m_url.getLength() -1;
@@ -394,8 +393,7 @@ bool FilePermission::implies( Permission const & perm ) const
#endif
}
// check /* wildcard: all files in that path (not recursive!)
- if (1 < m_url.getLength() &&
- 0 == ::rtl_ustr_ascii_compare_WithLength( m_url.getStr() + m_url.getLength() - 2, 2, "/*" ))
+ if (m_url.endsWith("/*"))
{
// demanded url must start with granted path (including path trailing path sep)
sal_Int32 len = m_url.getLength() -1;