[AltServer] Fixes isDeveloperDiskImageMountedForDevice()

Previously, we returned YES when there was no error. Instead, we should return YES only when there’s no error _and_ the developer disk image is installed.
This commit is contained in:
Riley Testut
2021-06-24 12:56:44 -07:00
parent d9678855a0
commit d4b957db23

View File

@@ -999,6 +999,8 @@ NSNotificationName const ALTDeviceManagerDeviceDidDisconnectNotification = @"ALT
__block lockdownd_client_t client = NULL;
__block lockdownd_service_descriptor_t service = NULL;
__block mobile_image_mounter_client_t mim = NULL;
__block BOOL isMounted = NO;
void (^finish)(NSError *) = ^(NSError *error) {
if (mim) {
@@ -1022,7 +1024,7 @@ NSNotificationName const ALTDeviceManagerDeviceDidDisconnectNotification = @"ALT
idevice_free(device);
}
completionHandler(error == nil, error);
completionHandler(isMounted, error);
};
dispatch_async(self.installationQueue, ^{
@@ -1058,8 +1060,6 @@ NSNotificationName const ALTDeviceManagerDeviceDidDisconnectNotification = @"ALT
return finish([NSError errorWithMobileImageMounterError:err device:altDevice]);
}
bool isMounted = false;
plist_dict_iter it = NULL;
plist_dict_new_iter(result, &it);