Commit eac7e7fc authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Add arcname argument to tar_stream.TarWriter.add()

parent 1e721f92
...@@ -11,8 +11,8 @@ class TarWriter: ...@@ -11,8 +11,8 @@ class TarWriter:
mode='w|', mode='w|',
format=tarfile.PAX_FORMAT) format=tarfile.PAX_FORMAT)
def add(self, path): def add(self, path, arcname=None):
self.tarfile.add(path, recursive=False) self.tarfile.add(path, arcname=arcname, recursive=False)
# Keep memory consumption down # Keep memory consumption down
self.tarfile.members = [] self.tarfile.members = []
self.tarfile.inodes = {} self.tarfile.inodes = {}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment