diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/idevicerestore.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/src/idevicerestore.c b/src/idevicerestore.c index 4d1d8d5..cb95e7d 100644 --- a/src/idevicerestore.c +++ b/src/idevicerestore.c @@ -646,30 +646,28 @@ int main(int argc, char* argv[]) { fixup_tss(client->tss); } - // Extract filesystem from IPSW and return its name - char* filesystem = NULL; - if (ipsw_extract_filesystem(client->ipsw, build_identity, &filesystem) < 0) { - error("ERROR: Unable to extract filesystem from IPSW\n"); - if (client->tss) - plist_free(client->tss); - plist_free(buildmanifest); - return -1; - } - // if the device is in normal mode, place device into recovery mode if (client->mode->index == MODE_NORMAL) { info("Entering recovery mode...\n"); if (normal_enter_recovery(client) < 0) { - error("ERROR: Unable to place device into recovery mode\n"); + error("ERROR: Unable to place device into recovery mode from %s mode\n", client->mode->string); if (client->tss) plist_free(client->tss); plist_free(buildmanifest); - if (filesystem) - unlink(filesystem); - return -1; + return -2; } } + // Extract filesystem from IPSW and return its name + char* filesystem = NULL; + if (ipsw_extract_filesystem(client->ipsw, build_identity, &filesystem) < 0) { + error("ERROR: Unable to extract filesystem from IPSW\n"); + if (client->tss) + plist_free(client->tss); + plist_free(buildmanifest); + return -1; + } + // if the device is in DFU mode, place device into recovery mode if (client->mode->index == MODE_DFU) { recovery_client_free(client); |