Fix ?/% mix-up in Perl_vms_start_glob.
authorCraig A. Berry <craigberry@mac.com>
Tue, 5 Jul 2011 02:19:15 +0000 (21:19 -0500)
committerCraig A. Berry <craigberry@mac.com>
Tue, 5 Jul 2011 02:19:15 +0000 (21:19 -0500)
When it sees the unixy ? as a single-character wildcard rather than
the native %, it intended to leave it alone when the CRTL's extended
character set processing was enabled, but it was actually checking
for a different and unrelated feature setting (case preservation),
meaning it would substitute % for ? in some cases where it meant
not to.  This likely did no harm in most cases as LIB$FIND_FILE
will honor either, but if the pattern were to be re-used in a context
that required POSIX semantics, the ? really ought to be preserved
and now it is.

Broken in dca5a9130eb9e045fd52f88cf3dedee7093e19f7.

vms/vms.c

index 2ce99d1..fef625c 100644 (file)
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -13676,7 +13676,7 @@ Perl_vms_start_glob
        for (cp=wilddsc.dsc$a_pointer; ok && cp && *cp; cp++) {
            if (*cp == '?') {
                 wildquery = 1;
-                if (!decc_efs_case_preserve)
+                if (!decc_efs_charset)
                     *cp = '%';
             } else if (*cp == '%') {
                 wildquery = 1;