mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-07-22 11:59:33 +00:00
backups: Set LANG=C.UTF-8 when extracting archive
This allows for filenames with unicode characters. Signed-off-by: James Valleroy <jvalleroy@mailbox.org> Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
This commit is contained in:
parent
4f6ed92286
commit
40607c84c8
@ -93,10 +93,11 @@ def subcommand_delete(arguments):
|
||||
def subcommand_extract(arguments):
|
||||
"""Extract archive contents."""
|
||||
prev_dir = os.getcwd()
|
||||
env = dict(os.environ, LANG='C.UTF-8')
|
||||
try:
|
||||
os.chdir(os.path.expanduser(arguments.destination))
|
||||
subprocess.run(['borg', 'extract', REPOSITORY + '::' + arguments.name],
|
||||
check=True)
|
||||
env=env, check=True)
|
||||
finally:
|
||||
os.chdir(prev_dir)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user