Mail Archives: djgpp/2003/02/01/15:45:17
> > Look at the variable "caseless" (in particular where it is set when the
> > name has upper case characters and use_lfn).
>
> I wish it were that simple, but it isn't.
Actually, it is. This variable is only used to control the flags to
the fnmatch call (the FNM_NOCASE flag). If "caseless" is set to 1,
the glob always does a case insensitive match, which is what the OP
wants (and is standard for all DOS/Win program behavior on the file
system).
Adding a statement like "if crt_flag_alwayscaseinsensitiveglob caseless=1"
should work (or make this default and require a flag to enable upper
case quirkyness).
> The ``when-to-downcase'' issue pops up in other places, not just in `glob'.
The what to return/display issue doesn't have anything to do with matching
case insensitively - the return file name will work in open statements
no matter what the case is. No proposal to change that behavior at all.
There is a flag to control it. There is no flag to control the
non-standard globing behavior.
If there are specific instances of GNU/Unixy programs that would expect
glob to fail (not match) based on case - I would argue they should be
the exceptions instead of the rule on a DOS/Windows based compiler.
- Raw text -