From d2aee71a92757fd06844c1a6a5bd0d1e62c1a0b8 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 --- ios-deploy.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ios-deploy.c b/ios-deploy.c index b430987..f562079 100644 --- a/ios-deploy.c +++ b/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);