diff options
author | Craig A. Berry <craigberry@mac.com> | 2013-02-05 21:05:55 -0600 |
---|---|---|
committer | Craig A. Berry <craigberry@mac.com> | 2013-02-05 21:05:55 -0600 |
commit | db2284bca1065422062fe29d79ef7df2eda275b4 (patch) | |
tree | 5a71636d5f45540c94d3836e59fe4955d4130b85 /vms/vms.c | |
parent | 59247333b91dc05c865ef5c89f217a9695709cb8 (diff) | |
download | perl-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.c | 21 |
1 files changed, 12 insertions, 9 deletions
@@ -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; |