summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorKai Sommerfeld <kso@openoffice.org>2002-10-08 12:59:10 +0000
committerKai Sommerfeld <kso@openoffice.org>2002-10-08 12:59:10 +0000
commit2840c5f2eec498fcde1c4632a80aed77130336e0 (patch)
tree36a411fe05c9bee35358f878ac68234211d47484 /ucb
parentf0a751f598146ba03095f4fa8b9844ed8abdd9a6 (diff)
#104069# - Fixed PackageUri::init()
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/ucp/package/pkguri.cxx19
1 files changed, 17 insertions, 2 deletions
diff --git a/ucb/source/ucp/package/pkguri.cxx b/ucb/source/ucp/package/pkguri.cxx
index 4a5b0bb5b4d4..ff419128eccd 100644
--- a/ucb/source/ucp/package/pkguri.cxx
+++ b/ucb/source/ucp/package/pkguri.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: pkguri.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: kso $ $Date: 2001-07-06 08:11:17 $
+ * last change: $Author: kso $ $Date: 2002-10-08 13:59:10 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -123,6 +123,21 @@ void PackageUri::init() const
return;
}
+ // Scheme must be followed by '://'
+ if ( ( m_aUri.getStr()[ PACKAGE_URL_SCHEME_LENGTH ]
+ != sal_Unicode( ':' ) )
+ ||
+ ( m_aUri.getStr()[ PACKAGE_URL_SCHEME_LENGTH + 1 ]
+ != sal_Unicode( '/' ) )
+ ||
+ ( m_aUri.getStr()[ PACKAGE_URL_SCHEME_LENGTH + 2 ]
+ != sal_Unicode( '/' ) ) )
+ {
+ // error, but remember that we did a init().
+ m_aPath = rtl::OUString::createFromAscii( "/" );
+ return;
+ }
+
// Scheme is case insensitive.
rtl::OUString aScheme
= m_aUri.copy( 0, PACKAGE_URL_SCHEME_LENGTH ).toAsciiLowerCase();