Robert Elz <[email protected]> wrote, on 08 Jun 2017:
>
> And while here, I am also not in favour of attempts to "fix" breakage, just
> so we appear to conform to the standard.  If "." and ".." are supposed to
> appear in the directories, and (for whatever reason) only one of them happens
> to be there, then readdir() should return just that one, not attempt to
> fake the other one.

In this situation the file system is corrupted and nobody could reasonably
expect that any file-system-related interface would behave as described
in the standard.  IMO the best thing that a system could do here is
return an error in order to bring attention to the problem.  (And the
documentation should say "If this error occurs, then unmount the file
system and run fsck.")

-- 
Geoff Clare <[email protected]>
The Open Group, Apex Plaza, Forbury Road, Reading, RG1 1AX, England

Reply via email to