Fix missing break in tovmsspec.
authorCraig A. Berry <craigberry@mac.com>
Sat, 12 Aug 2017 13:01:16 +0000 (08:01 -0500)
committerCraig A. Berry <craigberry@mac.com>
Sat, 12 Aug 2017 13:01:16 +0000 (08:01 -0500)
When encountering a question mark in a filespec being converted
from Unix to VMS format, we were inadvertently adding an escaped
space because of a missing break in a switch.

ext/VMS-Filespec/t/filespec.t
vms/vms.c

index 6d421e1..cfb0aaa 100644 (file)
@@ -137,6 +137,7 @@ foo-bar-0^.01/      vmsify [.foo-bar-0_01] [.foo-bar-0^.01]
 +foo.tmp       vmsify ^+foo.tmp ^
 ../foo\ \ bar/ vmsify [-.foo^_^_bar] ^
 ./foo.tmp      vmsify []foo.tmp ^
+x/r*???????    vmsify [.x]r*??????? ^
 
 # Fileifying directory specs
 __down_:[__the_.__garden_.__path_]     fileify __down_:[__the_.__garden_]__path_.dir;1 ^
index 2945791..5ca4d7c 100644 (file)
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -8731,6 +8731,7 @@ int_tovmsspec(const char *path, char *rslt, int dir_flag, int * utf8_flag)
        else
          *(cp1++) = '?';
        cp2++;
+       break;
     case ' ':
        if (cp2 >= path && (cp2 == path || *(cp2-1) != '^')) /* not previously escaped */
            *(cp1)++ = '^';