From 5efeeb8fe8618e2ae8ecc6f774221746896774ee Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 12 Sep 2013 20:06:50 -0700 Subject: [PATCH] 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. --- bin/dohtml.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.26.2