diff options
Diffstat (limited to 'tools/ideviceimagemounter.c')
-rw-r--r-- | tools/ideviceimagemounter.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/tools/ideviceimagemounter.c b/tools/ideviceimagemounter.c index 90c5190..b319d05 100644 --- a/tools/ideviceimagemounter.c +++ b/tools/ideviceimagemounter.c | |||
@@ -598,20 +598,13 @@ int main(int argc, char **argv) | |||
598 | case DISK_IMAGE_UPLOAD_TYPE_AFC: | 598 | case DISK_IMAGE_UPLOAD_TYPE_AFC: |
599 | default: | 599 | default: |
600 | printf("Uploading %s --> afc:///%s\n", image_path, targetname); | 600 | printf("Uploading %s --> afc:///%s\n", image_path, targetname); |
601 | char **strs = NULL; | 601 | plist_t fileinfo = NULL; |
602 | if (afc_get_file_info(afc, PKG_PATH, &strs) != AFC_E_SUCCESS) { | 602 | if (afc_get_file_info_plist(afc, PKG_PATH, &fileinfo) != AFC_E_SUCCESS) { |
603 | if (afc_make_directory(afc, PKG_PATH) != AFC_E_SUCCESS) { | 603 | if (afc_make_directory(afc, PKG_PATH) != AFC_E_SUCCESS) { |
604 | fprintf(stderr, "WARNING: Could not create directory '%s' on device!\n", PKG_PATH); | 604 | fprintf(stderr, "WARNING: Could not create directory '%s' on device!\n", PKG_PATH); |
605 | } | 605 | } |
606 | } | 606 | } |
607 | if (strs) { | 607 | plist_free(fileinfo); |
608 | int i = 0; | ||
609 | while (strs[i]) { | ||
610 | free(strs[i]); | ||
611 | i++; | ||
612 | } | ||
613 | free(strs); | ||
614 | } | ||
615 | 608 | ||
616 | uint64_t af = 0; | 609 | uint64_t af = 0; |
617 | if ((afc_file_open(afc, targetname, AFC_FOPEN_WRONLY, &af) != | 610 | if ((afc_file_open(afc, targetname, AFC_FOPEN_WRONLY, &af) != |