[fpc-pascal] DoDirSeparators and special filenames on Windows
Jürgen Hestermann
juergen.hestermann at gmx.de
Wed Sep 11 17:37:36 CEST 2013
Am 2013-09-11 10:04, schrieb Mattias Gaertner:
> Many webservers are running on Linux, where double path delims are
> pretty normal. You see them pretty often. A common cause are lines like
> this:
> File=$Directory/filename.ext
> You don't need to check if $Directory has already a '/' at the end,
> you simply concatenate. Reason is that Linux does not allow empty file
> names, so a '//' is never ambiguous and can safely be treated as a
> single '/'.
Well, Windows doesn't allow empty file names either.
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)?
The OS always seems to assume the latter but is it right?
And another question is: What appeared first?
The lazy programmers who did not care about correct path names
or the OS that allowed such things and so provoked the laziness.
I am realy astonished that nobody seems to find anything wrong with this.
More information about the fpc-pascal
mailing list