Handle the rare but legal angle bracket in unixify.
Craig A. Berry [Thu, 18 Jun 2009 02:23:49 +0000 (21:23 -0500)]
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/

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 */