diff options
author | 2024-07-25 10:02:46 +0800 | |
---|---|---|
committer | 2025-02-28 13:22:09 +0100 | |
commit | a6b6c35d1550acbd2552d49c2fe38115deec8fc0 (patch) | |
tree | 4d1a6444806c835dbcc550bed32db2bfb414bd56 /tools/afcclient.c | |
parent | 8dad5e214f1fa9d83b805517f3a6dcf355bf4662 (diff) | |
download | libimobiledevice-a6b6c35d1550acbd2552d49c2fe38115deec8fc0.tar.gz libimobiledevice-a6b6c35d1550acbd2552d49c2fe38115deec8fc0.tar.bz2 |
tool/afcclient: Fix local file name error on pulling folder from device
Signed-off-by: tomriddly <tomriddly@qq.com>
Diffstat (limited to 'tools/afcclient.c')
-rw-r--r-- | tools/afcclient.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/afcclient.c b/tools/afcclient.c index 1546a6c..1cddb36 100644 --- a/tools/afcclient.c +++ b/tools/afcclient.c @@ -922,7 +922,7 @@ static void handle_get(afc_client_t afc, int argc, char **argv) // target is a directory, put file under this target if (is_directory(dstpath)) { - const char *basen = path_get_basename(argv[0]); + const char *basen = path_get_basename(srcpath); uint8_t dst_is_root = strcmp(dstpath, "/") == 0; size_t len = dst_is_root ? (strlen(basen) + 2) : (strlen(dstpath) + 1 + strlen(basen) + 1); char *newdst = (char *) malloc(len); |