Commit 72b21817 authored by Richard M. Stallman's avatar Richard M. Stallman

(directory_file_name): Don't clobber the envvar

when handling top-level rooted dir.
parent eabf7f96
...@@ -468,9 +468,11 @@ directory_file_name (src, dst) ...@@ -468,9 +468,11 @@ directory_file_name (src, dst)
&& (ptr[rlen] == ']' || ptr[rlen] == '>') && (ptr[rlen] == ']' || ptr[rlen] == '>')
&& ptr[rlen - 1] == '.') && ptr[rlen - 1] == '.')
{ {
ptr[rlen - 1] = ']'; char * buf = (char *) alloca (strlen (ptr) + 1);
ptr[rlen] = '\0'; strcpy (buf, ptr);
return directory_file_name (ptr, dst); buf[rlen - 1] = ']';
buf[rlen] = '\0';
return directory_file_name (buf, dst);
} }
else else
dst[slen - 1] = ':'; dst[slen - 1] = ':';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment