diff options
author | Craig A. Berry <craigberry@mac.com> | 2013-02-05 07:20:23 -0600 |
---|---|---|
committer | Craig A. Berry <craigberry@mac.com> | 2013-02-05 07:20:23 -0600 |
commit | 09c9c44ccce7b244d267ab05e50a33742407dc60 (patch) | |
tree | 730e8e4150cc845afc286c537c16bebfca6f3fcf /vms/vms.c | |
parent | 589b831d85bd95555830dc835ed26032fc4c1b9a (diff) | |
download | perl-09c9c44ccce7b244d267ab05e50a33742407dc60.tar.gz |
Remove EFS escapes in unixify without directory components.
When converting a VMS file specification containing caret escapes
for extended characters to Unix format, we need to remove those
escapes. We were doing so for paths containing directory
components but we also need to do it for bare filenames. I.e.,
this was working:
disk:[dir]foo^%bar --> /disk/dir/foo%bar
but this was not (until now):
foo^%bar --> foo%bar
Diffstat (limited to 'vms/vms.c')
-rw-r--r-- | vms/vms.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -6957,7 +6957,13 @@ static char *int_tounixspec(const char *spec, char *rslt, int * utf8_fl) if (dirend == NULL) dirend = strrchr(spec,'>'); if (dirend == NULL) dirend = strchr(spec,':'); if (dirend == NULL) { - strcpy(rslt,spec); + while (*cp2) { + if (*cp2 == '^') + cp2++; + else + *(cp1++) = *(cp2++); + } + *cp1 = '\0'; if (vms_debug_fileify) { fprintf(stderr, "int_tounixspec: rslt = %s\n", rslt); } |