1 |
commit: 2110ec6ed42fc306d5c25cbf970d013ff2a226fd |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Aug 27 03:59:40 2013 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Aug 27 03:59:40 2013 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=2110ec6e |
7 |
|
8 |
dohtml: restore behavior noted in bug #425214 |
9 |
|
10 |
A trailing slash cause os.path.basename() and os.path.dirname() to |
11 |
behave differently, causing foo/ to behave similarly to the way that |
12 |
foo/* behaves. This behavior was broken by normalization in commit |
13 |
3f67cb453ee1b74894c230459b43855db7fcc410. |
14 |
|
15 |
--- |
16 |
bin/dohtml.py | 7 +++++++ |
17 |
1 file changed, 7 insertions(+) |
18 |
|
19 |
diff --git a/bin/dohtml.py b/bin/dohtml.py |
20 |
index ec9a80b..37d5b2e 100755 |
21 |
--- a/bin/dohtml.py |
22 |
+++ b/bin/dohtml.py |
23 |
@@ -206,7 +206,14 @@ def main(): |
24 |
success = False |
25 |
|
26 |
for x in args: |
27 |
+ trailing_slash = x[-1:] == os.sep |
28 |
x = normalize_path(x) |
29 |
+ if trailing_slash: |
30 |
+ # Modify behavior of basename and dirname |
31 |
+ # as noted in bug #425214, causing foo/ to |
32 |
+ # behave similarly to the way that foo/* |
33 |
+ # behaves. |
34 |
+ x += os.sep |
35 |
basename = os.path.basename(x) |
36 |
dirname = os.path.dirname(x) |
37 |
success |= install(basename, dirname, options) |