-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Paul Eggert on 11/9/2005 2:19 PM: > > However: what happens in DOS if you use a file name like "@:/a/b/c"?
In DOS, : is an invalid character, so the file name is outright rejected when passed to a function that actually visits the disk. But POSIX requires that basename(1) and dirname(1) operate even in the presence of invalid file names, without checking for existance or legality. On cygwin, : can be a valid file character (cygwin has managed mounts, where cygwin transparently translates the names in use by the program into valid characters for the file system). There, drive letters are exactly [A-Za-z]:, and all other leading characters (besides slashes, of course), are treated as a relative pathname from ./ rather than a drive designator. > Is this parsed as an invalid file letter, and then rejected, or as a > file name that's much like "@_/a/b/c" but just happens to have an > colon rather than an underscore? If the former, then surely dirname > should not bother to check whether the first character is a letter. Dirname really does need to check the first character for correctness on cygwin. - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDcsoS84KuGfSFAYARAstiAKCYECXbkcK9zww6hwQYQLDAoEPK5ACgrNV5 /92BFZApq/6gyrmUapWTQV8= =NxxZ -----END PGP SIGNATURE----- _______________________________________________ bug-gnulib mailing list bug-gnulib@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnulib