From df89e026ed5ada8524078d90a46c4c4549186c6d Mon Sep 17 00:00:00 2001 From: Fuchs Date: Fri, 21 Aug 2020 19:30:14 +0200 Subject: [PATCH] Fix path for mkvmerge --- Av1an/concat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Av1an/concat.py b/Av1an/concat.py index 50af3d1..7eda363 100644 --- a/Av1an/concat.py +++ b/Av1an/concat.py @@ -103,12 +103,12 @@ def concatenate_mkvmerge(temp: Path, output): log('Concatenating\n') encode_files = sorted((temp / 'encode').iterdir()) - concat = ' +'.join(f.as_posix() for f in encode_files) + concat = ' +'.join(shlex.quote(f.as_posix()) for f in encode_files) audio_file = temp / "audio.mkv" audio = audio_file.as_posix() if audio_file.exists() else '' - cmd = f' mkvmerge {concat} {audio} -o "{output}"' + cmd = f' mkvmerge {concat} {shlex.quote(audio)} -o {shlex.quote(output.as_posix())}' concat = subprocess.Popen(cmd, stdout=PIPE, universal_newlines=True, shell=True) output, err = concat.communicate() concat.wait()