diff --git a/src/blackgui/components/copyconfigurationcomponent.cpp b/src/blackgui/components/copyconfigurationcomponent.cpp index 6fd2af7d5..0510f39f2 100644 --- a/src/blackgui/components/copyconfigurationcomponent.cpp +++ b/src/blackgui/components/copyconfigurationcomponent.cpp @@ -82,6 +82,11 @@ namespace BlackGui const bool s = QFile::copy(file, target); if (s) { c++; } } + + // delete revision file in target if required + this->deleteRevisionFile(); + + // bye return c; } @@ -231,6 +236,14 @@ namespace BlackGui return files; } + void CCopyConfigurationComponent::deleteRevisionFile() const + { + if (!ui->rb_Cache->isChecked()) { return; } // only for cache, no .rev file for settigs + QFile rev(CDataCache::revisionFileName()); + if (!rev.exists()) { return; } + rev.remove(); + } + void CCopyConfigurationWizardPage::initializePage() { Q_ASSERT_X(m_config, Q_FUNC_INFO, "Missing config"); diff --git a/src/blackgui/components/copyconfigurationcomponent.h b/src/blackgui/components/copyconfigurationcomponent.h index 3e2364b46..0f61c7498 100644 --- a/src/blackgui/components/copyconfigurationcomponent.h +++ b/src/blackgui/components/copyconfigurationcomponent.h @@ -67,6 +67,9 @@ namespace BlackGui //! Get the selected files QStringList getSelectedFiles() const; + //! Delete the .rev file (caches) + void deleteRevisionFile() const; + QStringList m_otherVersionDirs; QScopedPointer ui; };