Fixes #156 - --list command add trailing slash for directories
This commit is contained in:
parent
6b7b31d54a
commit
ede5d2542d
@ -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);
|
AFCConnectionOpen(afcFd, 0, &afc_conn_p);
|
||||||
}
|
}
|
||||||
|
|
||||||
NSLogOut(@"%@", [NSString stringWithUTF8String:dir]);
|
|
||||||
|
|
||||||
afc_dictionary* afc_dict_p;
|
afc_dictionary* afc_dict_p;
|
||||||
char *key, *val;
|
char *key, *val;
|
||||||
int not_dir = 0;
|
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);
|
AFCKeyValueClose(afc_dict_p);
|
||||||
|
|
||||||
|
if (not_dir) {
|
||||||
|
NSLogOut(@"%@", [NSString stringWithUTF8String:dir]);
|
||||||
|
} else {
|
||||||
|
NSLogOut(@"%@/", [NSString stringWithUTF8String:dir]);
|
||||||
|
}
|
||||||
|
|
||||||
if (not_dir) {
|
if (not_dir) {
|
||||||
if (callback) (*callback)(afc_conn_p, dir, not_dir);
|
if (callback) (*callback)(afc_conn_p, dir, not_dir);
|
||||||
|
Loading…
Reference in New Issue
Block a user