From 7fe6705617d97134689d451cd96b666105172a62 Mon Sep 17 00:00:00 2001
From: Jens-Heiner Rechtien
Date: Tue, 15 Aug 2006 09:28:30 +0000
Subject: 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
---
connectivity/source/drivers/hsqldb/HDriver.cxx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
(limited to 'connectivity/source')
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(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"));
--
cgit