A trailing slash cause os.path.basename() and os.path.dirname() to
behave differently, causing foo/ to behave similarly to the way that
foo/* behaves. This behavior was broken by normalization in commit
3f67cb453ee1b74894c230459b43855db7fcc410.
success = False
for x in args:
+ trailing_slash = x[-1:] == os.sep
x = normalize_path(x)
+ if trailing_slash:
+ # Modify behavior of basename and dirname
+ # as noted in bug #425214, causing foo/ to
+ # behave similarly to the way that foo/*
+ # behaves.
+ x += os.sep
basename = os.path.basename(x)
dirname = os.path.dirname(x)
success |= install(basename, dirname, options)