In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/9b2457c186d2257f3ef7f3d7faca0bfdc74c6c98?hp=542a754528b7b23df13117bb0f791aeafa63c8f7>
- Log ----------------------------------------------------------------- commit 9b2457c186d2257f3ef7f3d7faca0bfdc74c6c98 Author: Craig A. Berry <[email protected]> Date: Thu Dec 4 08:02:09 2014 -0600 Unescape directory portion of path in unixify. Basically I missed a spot in 812e68ff314e, so the escaped space in [foo^_bar], for example, was not translated correctly. ----------------------------------------------------------------------- Summary of changes: ext/VMS-Filespec/t/filespec.t | 4 +++- vms/vms.c | 10 ++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ext/VMS-Filespec/t/filespec.t b/ext/VMS-Filespec/t/filespec.t index fe91ae0..f556703 100644 --- a/ext/VMS-Filespec/t/filespec.t +++ b/ext/VMS-Filespec/t/filespec.t @@ -34,6 +34,8 @@ foreach $test (@tests) { ($arg,$func,$expect2,$expect5) = split(/(?<!\\)\s+/,$test); $arg =~ s/\\//g; # to get whitespace into the argument escape with \ + $expect2 =~ s/\\//g; + $expect5 =~ s/\\//g; $expect2 = undef if $expect2 eq 'undef'; $expect2 = undef if $expect2 eq '^'; $expect5 = undef if $expect5 eq 'undef'; @@ -107,7 +109,7 @@ __some_:<__where_.__over_>__the_.__rainbow_ unixify /__some_/__where_/__over_ __lyrics_:[__are_.__very_^.__sappy_]__but_^.__rhymes_^.__are_.__true_ unixify /__lyrics_/__are_/__very_.__sappy_/__but_.__rhymes_.__are_.__true_ ^ [.$(macro)] unixify $(macro)/ ^ ^+foo.tmp unixify +foo.tmp ^ -[-.foo^_^_bar] unixify ../foo\ \ bar/ ^* +[-.foo^_^_bar] unixify ../foo\ \ bar/ ^ # and back again /__some_/__where_/__over_/__the_.__rainbow_ vmsify __some_:[__where_.__over_]__the_.__rainbow_ ^ diff --git a/vms/vms.c b/vms/vms.c index 080e894..cfc9cb7 100644 --- a/vms/vms.c +++ b/vms/vms.c @@ -7094,13 +7094,11 @@ static char *int_tounixspec(const char *spec, char *rslt, int * utf8_fl) PerlMem_free(tmp); for (; cp2 <= dirend; cp2++) { if ((*cp2 == '^')) { - /* EFS file escape, pass the next character as is */ - /* Fix me: HEX encoding for Unicode not implemented */ - *(cp1++) = *(++cp2); - /* An escaped dot stays as is -- don't convert to slash */ - if (*cp2 == '.') cp2++; + /* EFS file escape -- unescape it. */ + cp2 += copy_expand_vms_filename_escape(cp1, cp2, &outchars_added) - 1; + cp1 += outchars_added; } - if (*cp2 == ':') { + else if (*cp2 == ':') { *(cp1++) = '/'; if (*(cp2+1) == '[' || *(cp2+1) == '<') cp2++; } -- Perl5 Master Repository
