- dont barf on empty directories
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1522 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
7d7e07998d
commit
e968abd1a1
|
@ -247,10 +247,13 @@ int enum_dir(struct sc_path path, int depth)
|
|||
int i;
|
||||
|
||||
r = sc_list_files(card, files, sizeof(files));
|
||||
if (r <= 0) {
|
||||
if (r < 0) {
|
||||
fprintf(stderr, "sc_list_files() failed: %s\n", sc_strerror(r));
|
||||
return 1;
|
||||
}
|
||||
if (r == 0) {
|
||||
printf("Empty directory\n");
|
||||
} else
|
||||
for (i = 0; i < r/2; i++) {
|
||||
struct sc_path tmppath;
|
||||
|
||||
|
|
Loading…
Reference in New Issue