User: hr      
Date: 2006/08/15 03:28:33

Modified:
   dba/connectivity/source/drivers/hsqldb/HDriver.cxx

Log:
 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

File Changes:

Directory: /dba/connectivity/source/drivers/hsqldb/
===================================================

File [changed]: HDriver.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/hsqldb/HDriver.cxx?r1=1.18&r2=1.19
Delta lines:  +2 -2
-------------------
--- HDriver.cxx 10 Jul 2006 14:27:58 -0000      1.18
+++ HDriver.cxx 15 Aug 2006 10:28:30 -0000      1.19
@@ -217,7 +217,7 @@
                                ::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 @@
                                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"));




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to