summaryrefslogtreecommitdiff
path: root/dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx')
-rw-r--r--dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx b/dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx
index 35b4b84e8b90..edfb331d5b59 100644
--- a/dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx
+++ b/dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx
@@ -102,7 +102,11 @@ OXMLFileBasedDatabase::OXMLFileBasedDatabase( ODBFilter& rImport,
rtl::OUString sFileName = aPathOptions.SubstituteVariable(sValue);
if ( sValue == sFileName )
{
- sLocation = ::svt::OFileNotation(rImport.GetAbsoluteReference(sValue)).get( ::svt::OFileNotation::N_SYSTEM );
+ const sal_Int32 nFileNameLength = sFileName.getLength();
+ if ( ( nFileNameLength > 0 ) && ( sFileName.getStr()[ nFileNameLength - 1 ] == '/' ) )
+ sFileName = sFileName.copy( 0, nFileNameLength - 1 );
+
+ sLocation = ::svt::OFileNotation( rImport.GetAbsoluteReference( sFileName ) ).get( ::svt::OFileNotation::N_SYSTEM );
}
if ( sLocation.getLength() == 0 )