(safer_name_suffix): Skip leading ./

This commit is contained in:
Sergey Poznyakoff
2003-11-13 22:27:23 +00:00
parent fe4ee38fce
commit 052118a907

View File

@@ -1026,7 +1026,9 @@ safer_name_suffix (char const *file_name, bool link_target)
{
if (p[0] == '.' && p[1] == '.' && (ISSLASH (p[2]) || !p[2]))
prefix_len = p + 2 - file_name;
else if (p[0] == '.' && ISSLASH (p[1]))
prefix_len = p + 1 - file_name;
do
{
char c = *p++;