summaryrefslogtreecommitdiff
path: root/vms/vms.c
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2013-02-05 21:05:55 -0600
committerCraig A. Berry <craigberry@mac.com>2013-02-05 21:05:55 -0600
commitdb2284bca1065422062fe29d79ef7df2eda275b4 (patch)
tree5a71636d5f45540c94d3836e59fe4955d4130b85 /vms/vms.c
parent59247333b91dc05c865ef5c89f217a9695709cb8 (diff)
downloadperl-db2284bca1065422062fe29d79ef7df2eda275b4.tar.gz
Pass-through handling (again) in tovmsspec.
This is a partial retreat from b3efb2487fa7, where we started passing through all ambiguous filespecs without modification. We can now process the majority of cases that aren't macros, following 59247333b91 and various other commits that improved the escaping of dots. So for now we'll attempt to process these and pass through macros only.
Diffstat (limited to 'vms/vms.c')
-rw-r--r--vms/vms.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/vms/vms.c b/vms/vms.c
index c5ad229ed8..8466caadcc 100644
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -8388,17 +8388,20 @@ static char *int_tovmsspec
dirend = strrchr(path,'/');
if (dirend == NULL) {
- /* If we get here with no UNIX directory delimiters, then this is
- * not a complete file specification, such as a Unix glob
- * specification, shell macro, make macro, or even a valid VMS
- * filespec but with unescaped extended characters. The safest
- * thing in all these cases is to pass it through as-is.
+ /* If we get here with no Unix directory delimiters, then this is an
+ * ambiguous file specification, such as a Unix glob specification, a
+ * shell or make macro, or a filespec that would be valid except for
+ * unescaped extended characters. The safest thing if it's a macro
+ * is to pass it through as-is.
*/
- my_strlcpy(rslt, path, VMS_MAXRSS);
- if (vms_debug_fileify) {
- fprintf(stderr, "int_tovmsspec: rslt = %s\n", rslt);
+ if (strstr(path, "$(")) {
+ my_strlcpy(rslt, path, VMS_MAXRSS);
+ if (vms_debug_fileify) {
+ fprintf(stderr, "int_tovmsspec: rslt = %s\n", rslt);
+ }
+ return rslt;
}
- return rslt;
+ hasdir = 0;
}
else if (*(dirend+1) == '.') { /* do we have trailing "/." or "/.." or "/..."? */
if (!*(dirend+2)) dirend +=2;