in reply to Re: special directory entries
in thread special directory entries

(Update: I guess I missed the last line of your comment, and for some reason interpreted your comment to mean exactly the opposite of what you were trying to say, so disregard this note! Sorry.)

Under what conditions would a file named "..\n" exist, and why would you necessarily want to omit it? If you're looking to get at all files in a directory, but skip the special . and .., and you still want to get files that someone's done crazy stuff with, you wouldn't necessarily want to omit these.

Or am I misunderstanding something?

Replies are listed 'Best First'.
Re: Re: Re: special directory entries
by blakem (Monsignor) on Dec 04, 2001 at 02:35 UTC
    If a malicious hacker creates a file (or directory) called ".\n" a monitoring script using /^\.\.$/ will lump it in with '.' and '..' and skip right over it.

    -Blake