Date:        Wed, 5 Jun 2019 14:01:57 +0100
    From:        Stephane Chazelas <[email protected]>
    Message-ID:  <[email protected]>

  | As already discussed, like the [ .[.] = .. ] approach, that's
  | not foolproof because on a given system, there can be
  | directories where "." and ".." are returned by readdir() and
  | some where they aren't.

That was the idea - you do this in whatever directory you care
whether . or .. might be returned or not.

It wasn't intended as a "what does the shell do" test, but a
"what will happen here" test.   If there's a filesystem which
has (or doesn't have) . or .. in existing directories, but which
doesn't (or does) make them in new ones, then you're right, this
wouldn't necessarily work, but that's a filesystem I have never seen.

kre

Reply via email to