From ede5d2542d71d24208b492ce8e750abdc81c1e44 Mon Sep 17 00:00:00 2001 From: Shazron Abdullah Date: Tue, 6 Oct 2015 22:06:28 -0700 Subject: [PATCH] Fixes #156 - --list command add trailing slash for directories --- src/ios-deploy.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ios-deploy.c b/src/ios-deploy.c index c0febc1..a2cae06 100644 --- a/src/ios-deploy.c +++ b/src/ios-deploy.c @@ -1182,8 +1182,6 @@ void read_dir(service_conn_t afcFd, afc_connection* afc_conn_p, const char* dir, AFCConnectionOpen(afcFd, 0, &afc_conn_p); } - NSLogOut(@"%@", [NSString stringWithUTF8String:dir]); - afc_dictionary* afc_dict_p; char *key, *val; int not_dir = 0; @@ -1201,6 +1199,12 @@ void read_dir(service_conn_t afcFd, afc_connection* afc_conn_p, const char* dir, } } AFCKeyValueClose(afc_dict_p); + + if (not_dir) { + NSLogOut(@"%@", [NSString stringWithUTF8String:dir]); + } else { + NSLogOut(@"%@/", [NSString stringWithUTF8String:dir]); + } if (not_dir) { if (callback) (*callback)(afc_conn_p, dir, not_dir);