summaryrefslogtreecommitdiffstats
path: root/src/ipsw.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipsw.c')
-rw-r--r--src/ipsw.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ipsw.c b/src/ipsw.c
index 101c28a..9f24784 100644
--- a/src/ipsw.c
+++ b/src/ipsw.c
@@ -435,7 +435,11 @@ int ipsw_download_latest_fw(plist_t version_data, const char* product, const cha
info("Latest firmware is %s\n", fwfn);
char fwlfn[256];
- sprintf(fwlfn, "%s/%s", todir, fwfn);
+ if (todir) {
+ sprintf(fwlfn, "%s/%s", todir, fwfn);
+ } else {
+ sprintf(fwlfn, "%s", fwfn);
+ }
char fwlock[256];
sprintf(fwlock, "%s.lock", fwlfn);