summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/idevicerestore.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/idevicerestore.c b/src/idevicerestore.c
index 3824f10..ed89ae8 100644
--- a/src/idevicerestore.c
+++ b/src/idevicerestore.c
@@ -376,6 +376,12 @@ int main(int argc, char* argv[]) {
}
}
+ // verify if ipsw file exists
+ if (access(ipsw, F_OK) < 0) {
+ error("ERROR: Firmware file %s does not exist.\n", ipsw);
+ return -1;
+ }
+
// extract buildmanifest
plist_t buildmanifest = NULL;
if (client->flags & FLAG_CUSTOM) {