diff options
author | Andrzej J.R. Hunt <andrzej@ahunt.org> | 2013-07-20 12:05:44 +0200 |
---|---|---|
committer | Andrzej J.R. Hunt <andrzej@ahunt.org> | 2013-07-21 18:47:11 +0200 |
commit | 7c07cb265980031c034947ed653f78905f1d2ff3 (patch) | |
tree | e0c608a97c3c59d494ea7bab6f1c624c2d4d6fc8 /connectivity | |
parent | a815e1384dd47164aa0fcb17020293382d53adf0 (diff) |
Delete temporary fdb when closing.
Change-Id: I81660c16a0d05b6800c96b636114664cff8ab5fb
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/drivers/firebird/FConnection.cxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/connectivity/source/drivers/firebird/FConnection.cxx b/connectivity/source/drivers/firebird/FConnection.cxx index 9e6c2612921e..e984f618149b 100644 --- a/connectivity/source/drivers/firebird/FConnection.cxx +++ b/connectivity/source/drivers/firebird/FConnection.cxx @@ -683,11 +683,18 @@ void OConnection::disposing() m_xMetaData = ::com::sun::star::uno::WeakReference< ::com::sun::star::sdbc::XDatabaseMetaData>(); ISC_STATUS_ARRAY status; /* status vector */ - if (isc_detach_database(status, &m_DBHandler)) + if (isc_detach_database(status, &m_DBHandler)) // TODO: this consistently crashes if (pr_error(status, "dattach database")) return; // TODO: write to storage again? - // and delete temporary file. + if (m_bIsEmbedded) + { + uno::Reference< ucb::XSimpleFileAccess > xFileAccess( + ucb::SimpleFileAccess::create( comphelper::getProcessComponentContext()), + uno::UNO_QUERY); + if (xFileAccess->exists(m_sURL)) + xFileAccess->kill(m_sURL); + } dispose_ChildImpl(); cppu::WeakComponentImplHelperBase::disposing(); |