From 40607c84c8b120512e9d3718059c01231274b276 Mon Sep 17 00:00:00 2001 From: James Valleroy Date: Mon, 9 Jul 2018 21:14:49 -0400 Subject: [PATCH] backups: Set LANG=C.UTF-8 when extracting archive This allows for filenames with unicode characters. Signed-off-by: James Valleroy Reviewed-by: Joseph Nuthalapati --- actions/backups | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/actions/backups b/actions/backups index e84982194..9a42d65cd 100755 --- a/actions/backups +++ b/actions/backups @@ -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)