Kaydet (Commit) 307e84ac authored tarafından Julien Nabet's avatar Julien Nabet

tdf#118750: fix migration assistant

by catching throw if backup content file doesn't exist

Regression from 9ceeb461

Change-Id: I68bb27763573217a9dff0e263cb8be88e15255ad
Reviewed-on: https://gerrit.libreoffice.org/59900
Tested-by: Jenkins
Reviewed-by: 's avatarJulien Nabet <serval2412@yahoo.fr>
üst 4f3dec11
...@@ -621,8 +621,15 @@ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const OUString ...@@ -621,8 +621,15 @@ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const OUString
Reference<XStorage> xRootStorage = m_pImpl->getOrCreateRootStorage(); Reference<XStorage> xRootStorage = m_pImpl->getOrCreateRootStorage();
constexpr char BACKUP_XML_NAME[] = "content_before_migration.xml"; constexpr char BACKUP_XML_NAME[] = "content_before_migration.xml";
if(xRootStorage->isStreamElement(BACKUP_XML_NAME)) try
xRootStorage->removeElement(BACKUP_XML_NAME); {
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, xRootStorage->copyElementTo("content.xml", xRootStorage,
BACKUP_XML_NAME); BACKUP_XML_NAME);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment