On Tue, Aug 18, 2009 at 10:58 AM, Nicholas Clark<n...@ccl4.org> wrote:
> Oh gosh yes. I forgot. AUX.TXT
> And all the the other CP/M device file names, with our without extensions...
>
>
> [And of course, IIRC, DOS filenames can't be more than 64 characters. Which
> means that your code thinks that it knows what it's doing by stripping of
> the drive letter and allowing 62 in the rest of the pathname. Except that
> I remember university servers with drives UX: and UY:, which always made me
> wonder if there was a buffer overflow waiting to happen...]

Yes, lovely, isn't it?

> What does POSIX enforce? ASCII NUL terminated, multiple adjacent / characters
> fold to 1, except at the start, where // is special, but /// etc aren't?
> And anything else goes?

POSIX doesn't enforce much. I used our friendly do-no-evil empire, and
found this:

http://www.dwheeler.com/essays/fixing-unix-linux-filenames.html#standards

And particularly from «2.2. Standards permit the exclusion of bad filenames»:

«I then examined the Portable Filename Character Set, defined in 3.276
(“Portable Filename Character Set”); this turns out to be just A-Z,
a-z, 0-9, <period>, <underscore>, and <hyphen> (aka the dash
character). So it’s perfectly okay for a POSIX system to reject a
non-portable filename due to it having “odd” characters or a leading
hyphen.»
-- 
Jan

Reply via email to