diff --git a/rpmio/macro.c b/rpmio/macro.c index f9d3306..3f83821 100644 --- a/rpmio/macro.c +++ b/rpmio/macro.c @@ -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; }