diff options
author | Vikas Pachdha <vikas.pachdha@qt.io> | 2017-03-02 17:40:28 +0100 |
---|---|---|
committer | Vikas Pachdha <vikas.pachdha@qt.io> | 2017-03-03 12:04:29 +0000 |
commit | 350db24891a63b00b64439a836435da8b1aafe0b (patch) | |
tree | da75b9739301157e0c50eb85e98bf69355b7d86c /src/tools | |
parent | e575a60508e11868fb40d586df2f166c1ff2af49 (diff) | |
download | qt-creator-350db24891a63b00b64439a836435da8b1aafe0b.tar.gz |
iOS: Fix developer disk mount fail error
Task-number: QTCREATORBUG-17818
Change-Id: I172a3bc326ea777bed38e467c8a725acc68d13cd
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/iostool/iosdevicemanager.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/tools/iostool/iosdevicemanager.cpp b/src/tools/iostool/iosdevicemanager.cpp index ceec6c1778..e9439460cb 100644 --- a/src/tools/iostool/iosdevicemanager.cpp +++ b/src/tools/iostool/iosdevicemanager.cpp @@ -151,6 +151,8 @@ typedef int (MDEV_API *AMDeviceSecureInstallApplicationPtr)(int, AMDeviceRef, CF namespace Ios { namespace Internal { +static const am_res_t DeveloperImageAlreadyInstalled = 0xe8000076; /*Already installed*/ + class MobileDeviceLib { public : MobileDeviceLib(); @@ -1033,12 +1035,13 @@ bool CommandSession::mountDeveloperDiskImage() { if (connectDevice()) { CFStringRef cfImgPath = imagePath.toCFString(); - if (am_res_t result = lib()->deviceMountImage(device, cfImgPath, options, &mountCallback, 0)) { - addError(QString::fromLatin1("Mount Developer Disk Image \"%1\" failed, AMDeviceMountImage returned %2 (0x%3)") - .arg(imagePath).arg(mobileDeviceErrorString(lib(), result)).arg(QString::number(result, 16))); - } else { + am_res_t result = lib()->deviceMountImage(device, cfImgPath, options, &mountCallback, 0); + if (result == 0 || result == DeveloperImageAlreadyInstalled) { // Mounting succeeded. success = true; + } else { + addError(QString::fromLatin1("Mount Developer Disk Image \"%1\" failed, AMDeviceMountImage returned %2 (0x%3)") + .arg(imagePath).arg(mobileDeviceErrorString(lib(), result)).arg(QString::number(result, 16))); } CFRelease(cfImgPath); disconnectDevice(); |