[issue35964] shutil.make_archive (xxx, tar, root_dir) is adding './' entry to archive which is wrong

HFM report at bugs.python.org
Mon Feb 11 07:40:48 EST 2019


New submission from HFM <dandonmesvak at gmail.com>:

Running shutil.make_archive('a', 'tar', 'subdir') is created wrong and not really needed entry "./" which is visible in tarfile.Tarfile.list():

['./', 'foo/', 'hello.txt', 'foo/bar.txt']

I have tested and found this issue in the following versions of python:
2.7.15rc1  FOUND
3.6.7      FOUND
3.7.1      FOUND


I've attached a simple script which illustrates problem. Tested on Ubuntu Linux with mentioned python versions.

Similar issue has been fixed for 'zip' (https://bugs.python.org/issue28488) but exists for 'tar' archives.

----------
components: Library (Lib)
files: tarfile_test.tar
messages: 335211
nosy: HFM, alanmcintyre, bialix, python-dev, serhiy.storchaka, tarek, twouters
priority: normal
severity: normal
status: open
title: shutil.make_archive (xxx, tar, root_dir) is adding './' entry to archive which is wrong
versions: Python 2.7, Python 3.6, Python 3.7
Added file: https://bugs.python.org/file48132/tarfile_test.tar

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35964>
_______________________________________


More information about the Python-bugs-list mailing list