summaryrefslogtreecommitdiff
path: root/vms
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2014-11-18 19:03:51 -0600
committerCraig A. Berry <craigberry@mac.com>2014-11-18 20:36:39 -0600
commite283d9f3eca0ba7ff8f9bb3fe8cb8611758c7918 (patch)
treeae674787f528076255e56463d7c1bf55627755ed /vms
parent3ef6b8e9a9da2a3d97ef32e4df629373ca2ab5f9 (diff)
downloadperl-e283d9f3eca0ba7ff8f9bb3fe8cb8611758c7918.tar.gz
Escape EFS for directory portion in tovmsspec.
For some reason extended characters were only being escaped in the final component of the path, but not in the directory portion, the one exception being dots. We need to give the entire path the same treatment. There is probably considerable opportunity for further consolidation and refactoring in what we escape, but at least now ../foo bar/ correctly becomes [-.foo^_^_bar]. The reverse case has similar problems and is a TODO.
Diffstat (limited to 'vms')
-rw-r--r--vms/vms.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/vms/vms.c b/vms/vms.c
index 4278afed81..080e89443e 100644
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -8591,7 +8591,12 @@ static char *int_tovmsspec
VMSEFS_DOT_WITH_ESCAPE(cp1, rslt, VMS_MAXRSS);
}
}
- else *(cp1++) = *cp2;
+ else {
+ int out_cnt;
+ cp2 += copy_expand_unix_filename_escape(cp1, cp2, &out_cnt, utf8_flag);
+ cp2--; /* we're in a loop that will increment this */
+ cp1 += out_cnt;
+ }
infront = 1;
}
}