mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-15 01:33:25 +01:00
[AltServer] Ignores incompatible cached developer disks
Fixes issue where AltServer would always use cached developer disk, even if it isn’t compatible with the device’s operating system version.
This commit is contained in:
@@ -217,8 +217,17 @@ extension ALTDeviceManager
|
||||
ALTDeviceManager.shared.installDeveloperDiskImage(at: diskFileURL, signatureURL: signatureFileURL, to: device) { (success, error) in
|
||||
switch Result(success, error)
|
||||
{
|
||||
case .failure(let error): completionHandler(.failure(error))
|
||||
case .success: completionHandler(.success(()))
|
||||
case .failure(let error as ALTServerError) where error.code == .incompatibleDeveloperDisk:
|
||||
developerDiskManager.setDeveloperDiskCompatible(false, with: device)
|
||||
completionHandler(.failure(error))
|
||||
|
||||
case .failure(let error):
|
||||
// Don't mark developer disk as incompatible because it probably failed for a different reason.
|
||||
completionHandler(.failure(error))
|
||||
|
||||
case .success:
|
||||
developerDiskManager.setDeveloperDiskCompatible(true, with: device)
|
||||
completionHandler(.success(()))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user