From: Zac Medico Date: Fri, 13 Sep 2013 03:06:50 +0000 (-0700) Subject: dohtml: restore behavior noted in bug #425214 X-Git-Tag: v2.2.4 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5efeeb8fe8618e2ae8ecc6f774221746896774ee;p=portage.git dohtml: restore behavior noted in bug #425214 This goes along with commit 2110ec6ed42fc306d5c25cbf970d013ff2a226fd, adding support for trailing /. as well, since it's used at least by distutils-r1.eclass. --- diff --git a/bin/dohtml.py b/bin/dohtml.py index 500c52355..f98557f61 100755 --- a/bin/dohtml.py +++ b/bin/dohtml.py @@ -204,9 +204,10 @@ def main(): print("Allowed files :", options.allowed_files) success = False + endswith_slash = (os.sep, os.sep + ".") for x in args: - trailing_slash = x[-1:] == os.sep + trailing_slash = x.endswith(endswith_slash) x = normalize_path(x) if trailing_slash: # Modify behavior of basename and dirname