diff options
-rw-r--r-- | ucb/source/ucp/package/pkguri.cxx | 19 |
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(); |