Handle the rare but legal angle bracket in unixify.
authorCraig A. Berry <craigberry@mac.com>
Thu, 18 Jun 2009 02:23:49 +0000 (21:23 -0500)
committerDavid Mitchell <davem@iabyn.com>
Tue, 23 Jun 2009 22:24:40 +0000 (23:24 +0100)
We have been getting:

$ perl -e "print VMS::Filespec::unixify('foo:<bar>');"
/foo/<bar/

but should be (and now are) getting:

$ perl -e "print VMS::Filespec::unixify('foo:<bar>');"
/foo/bar/

(cherry picked from commit 5ad5b34cb2af84d4f37219a5dee752fca0459151)

vms/ext/filespec.t
vms/vms.c

index 5dd27c9..b40cc81 100644 (file)
@@ -83,6 +83,7 @@ __DATA__
 
 # Basic VMS to Unix filespecs
 __some_:[__where_.__over_]__the_.__rainbow_    unixify /__some_/__where_/__over_/__the_.__rainbow_ ^
+__some_:<__where_.__over_>__the_.__rainbow_    unixify /__some_/__where_/__over_/__the_.__rainbow_ ^
 [.__some_.__where_.__over_]__the_.__rainbow_   unixify __some_/__where_/__over_/__the_.__rainbow_ ^
 [-.__some_.__where_.__over_]__the_.__rainbow_  unixify ../__some_/__where_/__over_/__the_.__rainbow_ ^
 [.__some_.--.__where_.__over_]__the_.__rainbow_        unixify __some_/../../__where_/__over_/__the_.__rainbow_ ^
index 0896934..9e94935 100644 (file)
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -7346,7 +7346,7 @@ static char *int_tounixspec(const char *spec, char *rslt, int * utf8_fl)
     }
     if (*cp2 == ':') {
       *(cp1++) = '/';
-      if (*(cp2+1) == '[') cp2++;
+      if (*(cp2+1) == '[' || *(cp2+1) == '<') cp2++;
     }
     else if (*cp2 == ']' || *cp2 == '>') {
       if (*(cp1-1) != '/') *(cp1++) = '/'; /* Don't double after ellipsis */