[Libreoffice-commits] core.git: dbaccess/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sun Sep 2 11:03:46 UTC 2018
dbaccess/source/core/dataaccess/datasource.cxx | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
New commits:
commit 307e84ac706345510a4d347fbaaf3d53f8249dea
Author: Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Sun Sep 2 10:02:42 2018 +0200
Commit: Julien Nabet <serval2412 at yahoo.fr>
CommitDate: Sun Sep 2 13:03:24 2018 +0200
tdf#118750: fix migration assistant
by catching throw if backup content file doesn't exist
Regression from 9ceeb4619ba762c47589023d99c43c774caab441
Change-Id: I68bb27763573217a9dff0e263cb8be88e15255ad
Reviewed-on: https://gerrit.libreoffice.org/59900
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
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);
More information about the Libreoffice-commits
mailing list