Commit 3ef34192 authored by James Valleroy's avatar James Valleroy

backups: Use valid filename for export

Signed-off-by: James Valleroy's avatarJames Valleroy <jvalleroy@mailbox.org>
parent 33755e29
......@@ -21,6 +21,7 @@ FreedomBox app to manage backup archives.
import json
import os
from django.utils.text import get_valid_filename
from django.utils.translation import ugettext_lazy as _
from plinth import actions
......@@ -105,7 +106,9 @@ def delete_archive(name):
def export_archive(name, location):
if location[-1] != '/':
location += '/'
filename = location + 'FreedomBox-backups/' + name + '.tar.gz'
filename = location + 'FreedomBox-backups/' + get_valid_filename(
name) + '.tar.gz'
actions.superuser_run('backups',
['export', '--name', name, '--filename', filename])
......
Markdown is supported
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