On 05/03/2020 21:43, Paul Eggert wrote:
On 3/5/20 9:39 AM, Pádraig Brady wrote:
Ah well.
Does the attached address this for you.
Eeeuw.
Why is this code even there at all? If readdir(3) says that the current
directory has no entries, shouldn't 'ls' just say that? Why should ls
report an error simply because the current directory isn't reachable
from the filesystem? Whether the current directory is unreachable has
nothing to do with ls's job, which is to report whether the current
directory has entries.
I'm not very attached to the new behavior so feel free to apply this.
As per the original discussion, the change was made to distinguish
unreachable directories from empty directories.
Unreachable dirs are not common, but it seems useful for the user
to know they're in one
cheers,
Pádraig