summaryrefslogtreecommitdiff
path: root/vms/vms.c
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2013-02-05 07:20:23 -0600
committerCraig A. Berry <craigberry@mac.com>2013-02-05 07:20:23 -0600
commit09c9c44ccce7b244d267ab05e50a33742407dc60 (patch)
tree730e8e4150cc845afc286c537c16bebfca6f3fcf /vms/vms.c
parent589b831d85bd95555830dc835ed26032fc4c1b9a (diff)
downloadperl-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.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/vms/vms.c b/vms/vms.c
index 06a606a3bf..b92b7dab48 100644
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -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);
}