diff options
author | Nikias Bassen | 2019-02-14 00:26:25 +0100 |
---|---|---|
committer | Nikias Bassen | 2019-02-14 00:26:25 +0100 |
commit | 64e88489ee47f4e5dca458970688485a0a165c30 (patch) | |
tree | 6b54866538be3b62dd4e6b4896920c354787ce42 /src/restore.c | |
parent | fbaafdaf87cc01197ad86812a46cf17b7b392b8e (diff) | |
download | idevicerestore-64e88489ee47f4e5dca458970688485a0a165c30.tar.gz idevicerestore-64e88489ee47f4e5dca458970688485a0a165c30.tar.bz2 |
Allow .ipsw files or extracted IPSW as source
Diffstat (limited to 'src/restore.c')
-rw-r--r-- | src/restore.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/restore.c b/src/restore.c index f222d8a..0f2ce89 100644 --- a/src/restore.c +++ b/src/restore.c @@ -2,8 +2,8 @@ * restore.c * Functions for handling idevices in restore mode * + * Copyright (c) 2012-2019 Nikias Bassen. All Rights Reserved. * Copyright (c) 2010-2013 Martin Szulecki. All Rights Reserved. - * Copyright (c) 2012-2015 Nikias Bassen. All Rights Reserved. * Copyright (c) 2010 Joshua Hill. All Rights Reserved. * * This library is free software; you can redistribute it and/or @@ -938,7 +938,9 @@ int restore_send_nor(restored_client_t restore, struct idevicerestore_client_t* snprintf(manifest_file, sizeof(manifest_file), "%s/manifest", firmware_path); firmware_files = plist_new_dict(); - ipsw_extract_to_memory(client->ipsw, manifest_file, &manifest_data, &manifest_size); + if (ipsw_file_exists(client->ipsw, manifest_file)) { + ipsw_extract_to_memory(client->ipsw, manifest_file, &manifest_data, &manifest_size); + } if (manifest_data && manifest_size > 0) { info("Getting firmware manifest from %s\n", manifest_file); char *manifest_p = (char*)manifest_data; |