mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-26 17:16:20 +00:00
Fixed: Don't check if directory is empty when reinstalling in same directory
This commit is contained in:
parent
1b8e007ce3
commit
bd8e3d3b0a
2 changed files with 17 additions and 9 deletions
|
@ -106,7 +106,7 @@ void CInstallDialog::onAnotherLocationBrowseButtonClicked()
|
|||
|
||||
if (CConfigFile::getInstance()->isRyzomInstalledIn(directory)) break;
|
||||
|
||||
QMessageBox::StandardButton res = QMessageBox::warning(this, tr("Unable to find Ryzom"), tr("Unable to find Ryzom in selected directory. Please choose another one or cancel."));
|
||||
QMessageBox::StandardButton res = QMessageBox::warning(this, tr("Unable to find Ryzom"), tr("Unable to find Ryzom in selected directory. Please choose another one or cancel."));
|
||||
}
|
||||
|
||||
m_anotherDirectory = directory;
|
||||
|
@ -154,7 +154,7 @@ void CInstallDialog::accept()
|
|||
|
||||
if (freeSpace < server.dataUncompressedSize)
|
||||
{
|
||||
QMessageBox::StandardButton res = QMessageBox::warning(this, tr("Not enough free disk space"), tr("You don't have enough free space on this disk, please make more space or choose a directory on another disk."));
|
||||
QMessageBox::StandardButton res = QMessageBox::warning(this, tr("Not enough free disk space"), tr("You don't have enough free space on this disk, please make more space or choose a directory on another disk."));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -186,10 +186,14 @@ void CInstallDialog::accept()
|
|||
return;
|
||||
}
|
||||
|
||||
if (!isDirectoryEmpty(m_dstDirectory, true))
|
||||
// if reinstalling in same directory, don't check if directory is empty
|
||||
if (m_dstDirectory != CConfigFile::getInstance()->getNewInstallationDirectory())
|
||||
{
|
||||
QMessageBox::StandardButton res = QMessageBox::warning(this, tr("Directory not empty"), tr("This directory is not empty, please choose another one."));
|
||||
return;
|
||||
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())
|
||||
|
|
|
@ -122,7 +122,7 @@ void CMigrateDialog::accept()
|
|||
// compare with exact size of current directory
|
||||
if (freeSpace < getDirectorySize(m_currentDirectory, true))
|
||||
{
|
||||
QMessageBox::StandardButton res = QMessageBox::warning(this, tr("Not enough free disk space"), tr("You don't have enough free space on this disk, please make more space or choose a directory on another disk."));
|
||||
QMessageBox::StandardButton res = QMessageBox::warning(this, tr("Not enough free disk space"), tr("You don't have enough free space on this disk, please make more space or choose a directory on another disk."));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -154,10 +154,14 @@ void CMigrateDialog::accept()
|
|||
return;
|
||||
}
|
||||
|
||||
if (!isDirectoryEmpty(m_dstDirectory, true))
|
||||
// if reinstalling in same directory, don't check if directory is empty
|
||||
if (m_dstDirectory != CConfigFile::getInstance()->getNewInstallationDirectory())
|
||||
{
|
||||
QMessageBox::StandardButton res = QMessageBox::warning(this, tr("Directory not empty"), tr("This directory is not empty, please choose another one."));
|
||||
return;
|
||||
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);
|
||||
|
|
Loading…
Reference in a new issue