diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2006-08-15 09:28:30 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2006-08-15 09:28:30 +0000 |
commit | 7fe6705617d97134689d451cd96b666105172a62 (patch) | |
tree | 170a29ee1b5d8e9349e7c24886824cd49ad3689c /connectivity/source | |
parent | c347d6e9efc822e7a3fd8c3d0a0855e6c1630669 (diff) |
INTEGRATION: CWS dba30 (1.15.10); FILE MERGED
2006/07/19 10:13:33 fs 1.15.10.3: RESYNC: (1.16-1.18); FILE MERGED
2006/04/18 13:09:43 oj 1.15.10.2: RESYNC: (1.15-1.16); FILE MERGED
2005/12/29 12:50:52 oj 1.15.10.1: #i52873# url check corrected
Diffstat (limited to 'connectivity/source')
-rw-r--r-- | connectivity/source/drivers/hsqldb/HDriver.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx index 731fefb3fe54..1ae20a51e0ca 100644 --- a/connectivity/source/drivers/hsqldb/HDriver.cxx +++ b/connectivity/source/drivers/hsqldb/HDriver.cxx @@ -4,9 +4,9 @@ * * $RCSfile: HDriver.cxx,v $ * - * $Revision: 1.18 $ + * $Revision: 1.19 $ * - * last change: $Author: obo $ $Date: 2006-07-10 14:27:58 $ + * last change: $Author: hr $ $Date: 2006-08-15 10:28:30 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -217,7 +217,7 @@ namespace connectivity ::rtl::OUString sSystemPath; osl_getSystemPathFromFileURL( sURL.pData, &sSystemPath.pData ); sal_Int32 nIndex = sSystemPath.lastIndexOf('.'); - if ( nIndex == -1 ) + if ( !sURL.getLength() ) throw SQLException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("File URL is not correct.")) ,*this ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HY0000")) @@ -228,7 +228,7 @@ namespace connectivity Sequence< PropertyValue > aConvertedProperties(8); sal_Int32 nPos = 0; aConvertedProperties[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("storage_key")); - ::rtl::OUString sConnPartURL = sSystemPath.copy(0,nIndex); + ::rtl::OUString sConnPartURL = sSystemPath.copy(0,::std::max<sal_Int32>(nIndex,sSystemPath.getLength())); ::rtl::OUString sKey = StorageContainer::registerStorage(xStorage,sConnPartURL); aConvertedProperties[nPos++].Value <<= sKey; aConvertedProperties[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("storage_class_name")); |