mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 13:36:48 +08:00
refs #906, delete .rev file (if applicable) when files are copied
This commit is contained in:
committed by
Mathew Sutcliffe
parent
ecb7877908
commit
b3df6bbc7b
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user