Fix garbage output from ls on bad directory
This commit is contained in:
parent
9ec3d168f7
commit
632f13144f
@ -399,9 +399,9 @@ int main (int argc, char * argv[]) {
|
||||
printf("ls: cannot access %s: No such file or directory\n", p);
|
||||
free(f);
|
||||
out = 2;
|
||||
}
|
||||
|
||||
} else {
|
||||
list_insert(files, f);
|
||||
}
|
||||
|
||||
optind++;
|
||||
if (optind >= argc) p = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user