* path.cc (normalize_posix_path): Special care for root directory

in case of files beginning with a dot.
This commit is contained in:
Corinna Vinschen
2000-11-17 18:39:47 +00:00
parent 2ef98494d8
commit 46ba13261b
2 changed files with 10 additions and 1 deletions

View File

@@ -609,7 +609,11 @@ normalize_posix_path (const char *src, char *dst)
}
dst = strchr (dst, '\0');
if (*src == '.')
goto sawdot;
{
if (dst == dst_start + 1 && *dst_start == '/')
--dst;
goto sawdot;
}
if (dst > dst_start && !isslash (dst[-1]))
*dst++ = '/';
}