summaryrefslogtreecommitdiffstats
path: root/src/idevicerestore.c
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2012-11-07 22:16:45 +0100
committerGravatar Martin Szulecki2012-11-07 22:16:45 +0100
commitfd3ec03cb1ade6322c347bef3e325a0ab747b7fe (patch)
treeb8274ca961a5518df92dabe0930eb77f67040ece /src/idevicerestore.c
parent4d890286652dfd73169ecdbeb6e82ecc6f55079e (diff)
downloadidevicerestore-fd3ec03cb1ade6322c347bef3e325a0ab747b7fe.tar.gz
idevicerestore-fd3ec03cb1ade6322c347bef3e325a0ab747b7fe.tar.bz2
idevicerestore: add function to set cache path
Diffstat (limited to 'src/idevicerestore.c')
-rw-r--r--src/idevicerestore.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/idevicerestore.c b/src/idevicerestore.c
index 3b95702..8c7ad83 100644
--- a/src/idevicerestore.c
+++ b/src/idevicerestore.c
@@ -941,6 +941,19 @@ void idevicerestore_set_ipsw(struct idevicerestore_client_t* client, const char*
}
}
+void idevicerestore_set_cache_path(struct idevicerestore_client_t* client, const char* path)
+{
+ if (!client)
+ return;
+ if (client->cache_dir) {
+ free(client->cache_dir);
+ client->cache_dir = NULL;
+ }
+ if (path) {
+ client->cache_dir = strdup(path);
+ }
+}
+
void idevicerestore_set_progress_callback(struct idevicerestore_client_t* client, idevicerestore_progress_cb_t cbfunc, void* userdata)
{
if (!client)