diff options
author | Craig A. Berry <craigberry@mac.com> | 2012-12-04 07:23:57 -0600 |
---|---|---|
committer | Craig A. Berry <craigberry@mac.com> | 2012-12-04 07:23:57 -0600 |
commit | c434e88d3bead3f9417903defe6f23a1ad0ca522 (patch) | |
tree | a604b1492b56d5b1f97a4dbc72183311bf1476ab /vms | |
parent | 4a9a56a75c57646b348598f90875415e994d2f65 (diff) | |
download | perl-c434e88d3bead3f9417903defe6f23a1ad0ca522.tar.gz |
Avoid some doubled escapes in tovmsspec.
Since it's impossible to guarantee a filename is never makes
multiple trips through the Unix-to-VMS converter, it's important
not to escape characters that have already been escaped.
Diffstat (limited to 'vms')
-rw-r--r-- | vms/vms.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -8582,7 +8582,8 @@ static char *int_tovmsspec *(cp1++) = '?'; cp2++; case ' ': - *(cp1)++ = '^'; + if (cp2 > path && *(cp2-1) != '^') /* not previously escaped */ + *(cp1)++ = '^'; *(cp1)++ = '_'; cp2++; break; @@ -8666,7 +8667,8 @@ static char *int_tovmsspec case '|': case '<': case '>': - *(cp1++) = '^'; + if (cp2 > path && *(cp2-1) != '^') /* not previously escaped */ + *(cp1++) = '^'; *(cp1++) = *(cp2++); break; case ';': |