Tag: cws_src680_dba30
User: oj      
Date: 05/12/29 04:50:55

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

Log:
 #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.15&r2=1.15.10.1
Delta lines:  +5 -5
-------------------
--- HDriver.cxx 23 Sep 2005 11:39:24 -0000      1.15
+++ HDriver.cxx 29 Dec 2005 12:50:52 -0000      1.15.10.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: HDriver.cxx,v $
  *
- *  $Revision: 1.15 $
+ *  $Revision: 1.15.10.1 $
  *
- *  last change: $Author: hr $ $Date: 2005/09/23 11:39:24 $
+ *  last change: $Author: oj $ $Date: 2005/12/29 12:50:52 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -211,7 +211,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"))
@@ -222,7 +222,7 @@
                                Sequence< PropertyValue > 
aConvertedProperties(9);
                                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