backported upstream change (2.107->2.108):

- fix: "/path/foo.../bar" was losing a dot (#123844).
This commit is contained in:
Дмитрий Левин 2004-06-26 12:17:21 +00:00
parent 0f82b5c7b9
commit 67fbe0467b

View File

@ -1885,7 +1885,7 @@ char *rpmCleanPath(char * path)
/*@switchbreak@*/ break;
}
/* Trim embedded ./ , trailing /. */
if ((t[-1] == '/' && s[1] == '\0') || (t != path && s[1] == '/')) {
if ((t[-1] == '/' && s[1] == '\0') || (t > path && t[-1] == '/' && s[1] == '/')) {
s++;
continue;
}