diff options
author | Tamas Bunth <tamas.bunth@collabora.co.uk> | 2018-06-26 13:45:40 +0200 |
---|---|---|
committer | Tamás Bunth <btomi96@gmail.com> | 2018-07-06 13:56:58 +0200 |
commit | 9ceeb4619ba762c47589023d99c43c774caab441 (patch) | |
tree | 389c9153582052f1f24c3029f510ac5fc3d1f38e /dbaccess | |
parent | 9eb929aa8cb3f5b0fee1264119a55cdd8cbe8f0e (diff) |
HSQLDB Migration: overwrite backup xml
Change-Id: I080568f2d278e8a7153188497e3987217d9d188f
Reviewed-on: https://gerrit.libreoffice.org/56464
Tested-by: Jenkins
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/dataaccess/datasource.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx index 29d5816bc043..597c5a6d560b 100644 --- a/dbaccess/source/core/dataaccess/datasource.cxx +++ b/dbaccess/source/core/dataaccess/datasource.cxx @@ -599,8 +599,12 @@ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const OUString { // back up content xml file if migration was successful 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); xRootStorage->copyElementTo("content.xml", xRootStorage, - "content_before_migration.xml"); + BACKUP_XML_NAME); m_pImpl->m_sConnectURL = "sdbc:embedded:firebird"; } |