diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-11-05 21:25:02 +0000 |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-11-05 21:25:02 +0000 |
commit | 6f3a9dfb958fe6a5e88abd33d39477141bddf250 (patch) | |
tree | 3a029739b68917cee908f524f1080cad972d541e /Lib/ntpath.py | |
parent | 5a63c8deb644a82bc2049c8f448ff2e4e27f41d3 (diff) | |
download | cpython-6f3a9dfb958fe6a5e88abd33d39477141bddf250.tar.gz |
SF bug 478425: Change in os.path.join (ntpath.py)
ntpath.join('a', '') was producing 'a' instead of 'a\\' as in 2.1.
Impossible to guess what was ever *intended*, but since split('a\\')
produces ('a', ''), I think it's best if join('a', '') gives 'a\\' back.
Diffstat (limited to 'Lib/ntpath.py')
-rw-r--r-- | Lib/ntpath.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/ntpath.py b/Lib/ntpath.py index ed8a2ddf4f..21fadd0eb9 100644 --- a/Lib/ntpath.py +++ b/Lib/ntpath.py @@ -82,6 +82,12 @@ def join(a, *p): path += b else: path += "\\" + b + else: + # path is not empty and does not end with a backslash, + # but b is empty; since, e.g., split('a/') produces + # ('a', ''), it's best if join() adds a backslash in + # this case. + path += '\\' return path |