forked from qt-creator/qt-creator
Android: use QDir::mkPath() instead of QDir::mkdir() in SdkDownloader
Allow creating nested dirs path. Change-Id: I38106c148b177e5af06a59dd624ee74e2db1df40 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -107,8 +107,9 @@ void AndroidSdkDownloader::downloadAndExtractSdk(const QString &jdkPath, const Q
|
||||
|
||||
bool AndroidSdkDownloader::extractSdk(const QString &jdkPath, const QString &sdkExtractPath)
|
||||
{
|
||||
if (!QDir(sdkExtractPath).exists()) {
|
||||
if (!QDir().mkdir(sdkExtractPath)) {
|
||||
QDir sdkDir = QDir(sdkExtractPath);
|
||||
if (!sdkDir.exists()) {
|
||||
if (!sdkDir.mkpath(".")) {
|
||||
logError(QString(tr("Could not create the SDK folder %1.")).arg(sdkExtractPath));
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user