diff options
author | Martin Szulecki | 2012-07-17 15:51:13 +0200 |
---|---|---|
committer | Nikias Bassen | 2012-07-17 15:51:13 +0200 |
commit | 5e8990bf24b1f5319d1d1d00007f02919753b175 (patch) | |
tree | 4b5812031485921882bbfcb2995672fa83008f02 | |
parent | 7163a720efa9f506186781b024d0ef3900636279 (diff) | |
download | idevicerestore-5e8990bf24b1f5319d1d1d00007f02919753b175.tar.gz idevicerestore-5e8990bf24b1f5319d1d1d00007f02919753b175.tar.bz2 |
main: Check if IPSW exists before attempting to extract it
-rw-r--r-- | src/idevicerestore.c | 6 |
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) { |