Some docs on what it actually does with drive letters and UNC paths
would be nice.
> +string append_path_nt(string absolute, string ... relative)
> +{
> + return combine_path(absolute,
> + @map(relative, lambda(string s) {
> + if(s[1..1] == ":") {
> + s = s[0..0] + s[2..];
> + }
> + return combine_path("/", s)[1..];
This looks wrong. Where's your test suite? ;) ^^^^^
> + }));
> +}
> +#ifdef __NT__
> +function(string, string ... : string) append_path = append_path_nt;
> +#else
> +function(string, string ... : string) append_path = append_path_unix;
> +#endif
Please use a wrapper function instead:
string append_path (string absolute, string ... relative)
{
#ifdef __NT__
return append_path_nt (absolute, @relative);
#else
return append_path_unix (absolute, @relative);
#endif
}
It's more efficient.