mikeizbicki / ucr-cs100

open source software construction course
Other
485 stars 407 forks source link

calling ls on directories #58

Closed DanTheTingler closed 10 years ago

DanTheTingler commented 10 years ago

So I'm having some weird problems calling ls on directories.

My code works when I call: ./a.out bin -l (or any other flags/combinations of flags)

But when I JUST call: ./a.out bin, I get the correct output, but with a few added error messages:

Here is my output when I call ./a.out bin Error with stat: No such file or directory Error with readdir: No such file or directory Error with readdir: No such file or directory rshell

Here is the correct output (ls bin) rshell

So as you can see, mine outputs rshell in the end, but has three error messages that comes with it. And when I append flags, in any combination, any flags, any order, those error messages no longer occur.

DanTheTingler commented 10 years ago

nvm i think I've found the error, ignore this question for now please.