diff options
author | 2025-06-29 23:54:16 +0200 | |
---|---|---|
committer | 2025-06-29 23:54:16 +0200 | |
commit | cb34a171994562a78da7ea14b801759747d0fdf7 (patch) | |
tree | 8a5c93443ec58b323e437db4655b603f622eeadb /tools/ideviceimagemounter.c | |
parent | 9049ffb7eaab5a75018bb8fb1a54a9c9903daf00 (diff) | |
download | libimobiledevice-cb34a171994562a78da7ea14b801759747d0fdf7.tar.gz libimobiledevice-cb34a171994562a78da7ea14b801759747d0fdf7.tar.bz2 |
tools: Use new afc_get_file_info_plist/afc_get_device_info_plist functions
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) != |