diff options
-rw-r--r-- | src/plugins/android/androidsettingswidget.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/plugins/android/androidsettingswidget.cpp b/src/plugins/android/androidsettingswidget.cpp index 95c67ae264..fb1e4c76c6 100644 --- a/src/plugins/android/androidsettingswidget.cpp +++ b/src/plugins/android/androidsettingswidget.cpp @@ -817,16 +817,16 @@ void AndroidSettingsWidget::downloadOpenSslRepo(const bool silent) gitCloneCommand.toUserOutput(); QDir openSslDir(openSslPath.toString()); - if (openSslDir.exists()) { - auto userInput = QMessageBox::information(this, openSslCloneTitle, - tr("The selected download path (%1) for OpenSSL already exists. " - "Remove and overwrite its content?") - .arg(QDir::toNativeSeparators(openSslPath.toString())), - QMessageBox::Yes | QMessageBox::No); - if (userInput == QMessageBox::Yes) - openSslDir.removeRecursively(); - else - return; + const bool isEmptyDir = openSslDir.isEmpty(QDir::AllEntries | QDir::NoDotAndDotDot + | QDir::Hidden | QDir::System); + if (openSslDir.exists() && !isEmptyDir) { + QMessageBox::information( + this, + openSslCloneTitle, + tr("The selected download path (%1) for OpenSSL already exists and the directory is " + "not empty. Select a different path or make sure it is an empty directory.") + .arg(QDir::toNativeSeparators(openSslPath.toString()))); + return; } QProgressDialog *openSslProgressDialog |