Fix garbage output from ls on bad directory
This commit is contained in:
parent
9ec3d168f7
commit
632f13144f
@ -399,10 +399,10 @@ 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);
|
||||
}
|
||||
|
||||
list_insert(files, f);
|
||||
|
||||
optind++;
|
||||
if (optind >= argc) p = NULL;
|
||||
else p = argv[optind];
|
||||
|
Loading…
Reference in New Issue
Block a user