Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
2ef5559e
Commit
2ef5559e
authored
Apr 20, 2007
by
Lars Gustäbel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix directory names to have only one trailing slash.
A regression from rev. 52525.
parent
1f5caab7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
1 deletion
+19
-1
Lib/tarfile.py
Lib/tarfile.py
+1
-1
Lib/test/test_tarfile.py
Lib/test/test_tarfile.py
+7
-0
Misc/NEWS
Misc/NEWS
+11
-0
No files found.
Lib/tarfile.py
View file @
2ef5559e
...
...
@@ -1842,7 +1842,7 @@ class TarFile(object):
tarinfo
.
type
=
DIRTYPE
# Directory names should have a '/' at the end.
if
tarinfo
.
isdir
():
if
tarinfo
.
isdir
()
and
not
tarinfo
.
name
.
endswith
(
"/"
)
:
tarinfo
.
name
+=
"/"
self
.
members
.
append
(
tarinfo
)
...
...
Lib/test/test_tarfile.py
View file @
2ef5559e
...
...
@@ -191,6 +191,13 @@ class ReadTest(BaseTest):
except
:
pass
def
test_dirtype
(
self
):
for
tarinfo
in
self
.
tar
:
if
tarinfo
.
isdir
():
self
.
assert_
(
tarinfo
.
name
.
endswith
(
"/"
))
self
.
assert_
(
not
tarinfo
.
name
[:
-
1
].
endswith
(
"/"
))
class
ReadStreamTest
(
ReadTest
):
sep
=
"|"
...
...
Misc/NEWS
View file @
2ef5559e
...
...
@@ -4,6 +4,17 @@ Python News
(
editors
:
check
NEWS
.
help
for
information
about
editing
NEWS
using
ReST
.)
What
's New in Python 2.5.2c1?
=============================
*Release date: XX-XXX-XXXX*
Library
-------
- tarfile.py: Fix directory names to have only one trailing slash.
What'
s
New
in
Python
2.5.1
?
=============================
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment