summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/VMS-Filespec/t/filespec.t3
-rw-r--r--vms/vms.c5
2 files changed, 5 insertions, 3 deletions
diff --git a/ext/VMS-Filespec/t/filespec.t b/ext/VMS-Filespec/t/filespec.t
index f556703ab8..6d421e1ad9 100644
--- a/ext/VMS-Filespec/t/filespec.t
+++ b/ext/VMS-Filespec/t/filespec.t
@@ -110,6 +110,7 @@ __lyrics_:[__are_.__very_^.__sappy_]__but_^.__rhymes_^.__are_.__true_ unixify
[.$(macro)] unixify $(macro)/ ^
^+foo.tmp unixify +foo.tmp ^
[-.foo^_^_bar] unixify ../foo\ \ bar/ ^
+[]foo.tmp unixify ./foo.tmp ^
# and back again
/__some_/__where_/__over_/__the_.__rainbow_ vmsify __some_:[__where_.__over_]__the_.__rainbow_ ^
@@ -135,6 +136,8 @@ foo-bar-0^.01/ vmsify [.foo-bar-0_01] [.foo-bar-0^.01]
\ foo.tmp vmsify ^_foo.tmp ^
+foo.tmp vmsify ^+foo.tmp ^
../foo\ \ bar/ vmsify [-.foo^_^_bar] ^
+./foo.tmp vmsify []foo.tmp ^
+
# Fileifying directory specs
__down_:[__the_.__garden_.__path_] fileify __down_:[__the_.__garden_]__path_.dir;1 ^
[.__down_.__the_.__garden_.__path_] fileify [.__down_.__the_.__garden_]__path_.dir;1 ^
diff --git a/vms/vms.c b/vms/vms.c
index 03644150dd..953d8b870b 100644
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -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) {