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.
__lyrics_:[__are_.__very_^.__sappy_]__but_^.__rhymes_^.__are_.__true_ unixify /__lyrics_/__are_/__very_.__sappy_/__but_.__rhymes_.__are_.__true_ ^
[.$(macro)] unixify $(macro)/ ^
^+foo.tmp unixify +foo.tmp ^
+[-.foo^_^_bar] unixify ../foo\ \ bar/ ^*
# and back again
/__some_/__where_/__over_/__the_.__rainbow_ vmsify __some_:[__where_.__over_]__the_.__rainbow_ ^
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] ^
# 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 ^
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;
}
}