mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-26 16:56:19 +00:00
Fixed: Don't check if directory is empty when reinstalling in same directory
This commit is contained in:
parent
1a54eb6572
commit
87dffb425d
2 changed files with 17 additions and 9 deletions
|
@ -186,11 +186,15 @@ void CInstallDialog::accept()
|
|||
return;
|
||||
}
|
||||
|
||||
// if reinstalling in same directory, don't check if directory is empty
|
||||
if (m_dstDirectory != CConfigFile::getInstance()->getNewInstallationDirectory())
|
||||
{
|
||||
if (!isDirectoryEmpty(m_dstDirectory, true))
|
||||
{
|
||||
QMessageBox::StandardButton res = QMessageBox::warning(this, tr("Directory not empty"), tr("This directory is not empty, please choose another one."));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (oldDirectoryRadioButton->isChecked())
|
||||
{
|
||||
|
|
|
@ -154,11 +154,15 @@ void CMigrateDialog::accept()
|
|||
return;
|
||||
}
|
||||
|
||||
// if reinstalling in same directory, don't check if directory is empty
|
||||
if (m_dstDirectory != CConfigFile::getInstance()->getNewInstallationDirectory())
|
||||
{
|
||||
if (!isDirectoryEmpty(m_dstDirectory, true))
|
||||
{
|
||||
QMessageBox::StandardButton res = QMessageBox::warning(this, tr("Directory not empty"), tr("This directory is not empty, please choose another one."));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
CConfigFile::getInstance()->setSrcServerDirectory(m_currentDirectory);
|
||||
CConfigFile::getInstance()->setInstallationDirectory(m_dstDirectory);
|
||||
|
|
Loading…
Reference in a new issue