mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
Backups: export and download archives in one step
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
1 parent
629e34f93c
commit
ff673b0d73
5 files changed
+56
-6
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user