[fpc-pascal] DoDirSeparators and special filenames on Windows

Reimar Grabowski reimgrab at web.de
Wed Sep 11 19:36:53 CEST 2013


On Wed, 11 Sep 2013 17:37:36 +0200
Jürgen Hestermann <juergen.hestermann at gmx.de> wrote:

> And double delimiters *are* ambiguous:
> Has a (one letter) file name been forgotten or was an additional
> delimiter typed (or appended by bad programmed routines)?
Ambiguity is not defined by how the symbol came into being. You just look at the symbol as is.
So Mattias statement *is* correct.

> I am realy astonished that nobody seems to find anything wrong with this.
user at computer:/tmp$ mkdir hans
user at computer:/tmp$ mkdir hans////////pete
user at computer:/tmp$ cd hans
user at computer:/tmp/hans$ ls -la
total 12
drwxrwxr-x 3 user user 4096 Sep 11 19:13 .
drwxrwxrwt 9 root root 4096 Sep 11 19:13 ..
drwxrwxr-x 2 user user 4096 Sep 11 19:13 pete

Nothing wrong. All fine and dandy.

IEEE Std 1003.1, 2004 Edition (http://pubs.opengroup.org/onlinepubs/009695399/) says:

3.266 Pathname

A character string that is used to identify a file. In the context of IEEE Std 1003.1-2001, a pathname consists of, at most, {PATH_MAX} bytes, including the terminating null byte. It has an optional beginning slash, followed by zero or more filenames separated by slashes. A pathname may optionally contain one or more trailing slashes. Multiple successive slashes are considered to be the same as one slash.

R.

Disclaimer: I know that Linux is not Unix and not Posix.



More information about the fpc-pascal mailing list