diff options
-rw-r--r-- | dbaccess/source/core/dataaccess/datasource.cxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx index db19f9edd912..8ecba91846d4 100644 --- a/dbaccess/source/core/dataaccess/datasource.cxx +++ b/dbaccess/source/core/dataaccess/datasource.cxx @@ -621,8 +621,15 @@ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const OUString Reference<XStorage> xRootStorage = m_pImpl->getOrCreateRootStorage(); constexpr char BACKUP_XML_NAME[] = "content_before_migration.xml"; - if(xRootStorage->isStreamElement(BACKUP_XML_NAME)) - xRootStorage->removeElement(BACKUP_XML_NAME); + try + { + if(xRootStorage->isStreamElement(BACKUP_XML_NAME)) + xRootStorage->removeElement(BACKUP_XML_NAME); + } + catch (NoSuchElementException&) + { + SAL_INFO("dbaccess", "No file content_before_migration.xml found" ); + } xRootStorage->copyElementTo("content.xml", xRootStorage, BACKUP_XML_NAME); |