Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Anders Blomdell
hash_backup
Commits
eac7e7fc
Commit
eac7e7fc
authored
Jan 20, 2021
by
Anders Blomdell
Browse files
Add arcname argument to tar_stream.TarWriter.add()
parent
1e721f92
Changes
1
Hide whitespace changes
Inline
Side-by-side
tar_stream.py
View file @
eac7e7fc
...
...
@@ -11,8 +11,8 @@ class TarWriter:
mode
=
'w|'
,
format
=
tarfile
.
PAX_FORMAT
)
def
add
(
self
,
path
):
self
.
tarfile
.
add
(
path
,
recursive
=
False
)
def
add
(
self
,
path
,
arcname
=
None
):
self
.
tarfile
.
add
(
path
,
arcname
=
arcname
,
recursive
=
False
)
# Keep memory consumption down
self
.
tarfile
.
members
=
[]
self
.
tarfile
.
inodes
=
{}
...
...
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