diff options
author | Craig A. Berry <craigberry@mac.com> | 2007-06-15 03:19:46 +0000 |
---|---|---|
committer | Craig A. Berry <craigberry@mac.com> | 2007-06-15 03:19:46 +0000 |
commit | a096370a74e810dad2fc069cd86600e0bfb428a9 (patch) | |
tree | 9e30dc8651260d6f98962207296b8d4d30af46a4 /vms | |
parent | b89086ac06f49c4900b782c8f5c803b4f0092517 (diff) | |
download | perl-a096370a74e810dad2fc069cd86600e0bfb428a9.tar.gz |
Don't let the home-grown readdir() on VMS return results with
ODS-5 escapes (i.e., report foo.tar.gz, not foo^.tar.gz).
p4raw-id: //depot/perl@31385
Diffstat (limited to 'vms')
-rw-r--r-- | vms/vms.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -8759,9 +8759,6 @@ Perl_opendir(pTHX_ const char *name) DIR *dd; char *dir; Stat_t sb; - int unix_flag = 0; - - unix_flag = is_unix_filespec(name); Newx(dir, VMS_MAXRSS, char); if (do_tovmspath(name,dir,0,NULL) == NULL) { @@ -8792,8 +8789,12 @@ Perl_opendir(pTHX_ const char *name) dd->context = 0; dd->count = 0; dd->flags = 0; - if (unix_flag) - dd->flags = PERL_VMSDIR_M_UNIXSPECS; + /* By saying we always want the result of readdir() in unix format, we + * are really saying we want all the escapes removed. Otherwise the caller, + * having no way to know whether it's already in VMS format, might send it + * through tovmsspec again, thus double escaping. + */ + dd->flags = PERL_VMSDIR_M_UNIXSPECS; dd->pat.dsc$a_pointer = dd->pattern; dd->pat.dsc$w_length = strlen(dd->pattern); dd->pat.dsc$b_dtype = DSC$K_DTYPE_T; |