Backups: export and download archives in one step

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Michael Pimmer authored and James Valleroy committed 2018-11-17 08:59:03 -05:00
1 parent 629e34f93c
commit ff673b0d73
5 files changed
+56 -6

No files matched your search

+3
View File
@@ -132,6 +132,9 @@ def subcommand_extract(arguments):
def subcommand_export(arguments):
"""Export archive contents as tarball."""
# TODO: if this is only used for files in /tmp, add checks to verify that
# arguments.filename is within /tmp
# TODO: arguments.filename is not a filename but a path
path = os.path.dirname(arguments.filename)
if not os.path.exists(path):
os.makedirs(path)