This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Clarify reporting of .DIR extension on VMS.
authorCraig A. Berry <craigberry@mac.com>
Sun, 25 Nov 2012 01:06:45 +0000 (19:06 -0600)
committerCraig A. Berry <craigberry@mac.com>
Sun, 25 Nov 2012 01:17:20 +0000 (19:17 -0600)
In readdir and start_glob, we were removing the .DIR extension from
VMS directory names when reporting results in Unix format, but also
when Extended Filename Syntax (EFS) was enabled.  The former makes
sense, but the latter (by itself) doesn't.

vms/vms.c

index 3b9b032..15f350b 100644 (file)
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -10153,7 +10153,7 @@ Perl_readdir(pTHX_ DIR *dd)
 
         /* In Unix report mode, remove the ".dir;1" from the name */
         /* if it is a real directory. */
-        if (decc_filename_unix_report || decc_efs_charset) {
+        if (decc_filename_unix_report && decc_efs_charset) {
             if (is_dir_ext(e_spec, e_len, vs_spec, vs_len)) {
                 Stat_t statbuf;
                 int ret_sts;
@@ -13181,7 +13181,7 @@ Perl_vms_start_glob
 
                 /* In Unix report mode, remove the ".dir;1" from the name */
                 /* if it is a real directory */
-                if (decc_filename_unix_report || decc_efs_charset) {
+                if (decc_filename_unix_report && decc_efs_charset) {
                     if (is_dir_ext(e_spec, e_len, vs_spec, vs_len)) {
                         Stat_t statbuf;
                         int ret_sts;