2017-06-08 11:01:29 +0100, Geoff Clare:
> 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.")
[...]

One can imagine a system where the directory at the root of a
file system has a "." but no ".." entry (since the root
directory has no parent).

Or a system that fakes "." entries for filesystems that don't
have them but not ".." or the other way round. The question here
is whether it is allowed or not.

If POSIX leaves it unspecified whether any of them exist anyway,
it doesn't really matter *why* they may not be there.

-- 
Stephane

Reply via email to