classification
Title: shutil.make_archive (xxx, tar, root_dir) is adding './' entry to archive which is wrong
Type: Stage:
Components: Library (Lib) Versions: Python 3.7, Python 3.6, Python 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: HFM, Oskar Persson, alanmcintyre, bialix, python-dev, serhiy.storchaka, tarek, twouters
Priority: normal Keywords:

Created on 2019-02-11 12:40 by HFM, last changed 2019-02-11 14:03 by Oskar Persson.

Files
File name Uploaded Description Edit
tarfile_test.tar HFM, 2019-02-11 12:40 reproduce the problem
Messages (1)
msg335211 - (view) Author: HFM (HFM) Date: 2019-02-11 12:40
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.
History
Date User Action Args
2019-02-11 14:03:41Oskar Perssonsetnosy: + Oskar Persson
2019-02-11 12:40:46HFMcreate