diff options
author | Craig A. Berry <craigberry@mac.com> | 2015-05-04 21:25:05 -0500 |
---|---|---|
committer | Craig A. Berry <craigberry@mac.com> | 2015-05-06 18:51:22 -0500 |
commit | f401ac158eb0a92eccfb544c5b7589a6bf8404a6 (patch) | |
tree | 1076bae47e89db9105bb80258d68642400de5957 /vms | |
parent | abdf340104c29dbd310ff3e2102fb061a7a1f925 (diff) | |
download | perl-f401ac158eb0a92eccfb544c5b7589a6bf8404a6.tar.gz |
Fix unixify when beginning with current directory.
VMS::Filespec::unixify has been truncating its return value and
returning early when the input begins with [] meaning the current
directory. If there was nothing else, we've been getting the right
answer:
[] --> ./
but if there was a file portion of the name it's been getting
omitted:
[]foo.txt --> ./
which is now fixed. Looks like it's been broken since inception
in 5.002, though only with the specific [] case and not if there
was an explicit device or directory name.
Diffstat (limited to 'vms')
-rw-r--r-- | vms/vms.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -7073,9 +7073,8 @@ int_tounixspec(const char *spec, char *rslt, int * utf8_fl) else { /* the VMS spec begins with directories */ cp2++; if (*cp2 == ']' || *cp2 == '>') { - *(cp1++) = '.'; *(cp1++) = '/'; *(cp1++) = '\0'; - PerlMem_free(tmp); - return rslt; + *(cp1++) = '.'; + *(cp1++) = '/'; } else if ( *cp2 != '^' && *cp2 != '.' && *cp2 != '-') { /* add the implied device */ if (getcwd(tmp, VMS_MAXRSS-1 ,1) == NULL) { |