[issue21987] TarFile.getmember on directory requires trailing slash iff over 100 chars
Serhiy Storchaka
report at bugs.python.org
Tue Dec 28 13:51:01 EST 2021
Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:
Well, the tar command strips trailing slashes (even from file paths), so it is reasonable to do this in getmember().
$ mkdir dir
$ touch dir/file
$ tar cf archive.tar dir
$ tar tf archive.tar dir
dir/
dir/file
$ tar tf archive.tar dir/
dir/
dir/file
$ tar tf archive.tar dir/file
dir/file
$ tar tf archive.tar dir/file/
dir/file
$ tar tf archive.tar dir/file////
dir/file
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue21987>
_______________________________________
More information about the Python-bugs-list
mailing list