[Concat] Ensure final directory exists

Fixes https://github.com/yt-dlp/yt-dlp/issues/3181#issuecomment-1079622589
This commit is contained in:
pukkandan 2022-03-27 04:52:11 +05:30
parent 34baa9fdf0
commit 5cf34021f5
No known key found for this signature in database
GPG Key ID: 7EEE9E1E817D0A39

View File

@ -1129,6 +1129,8 @@ class FFmpegConcatPP(FFmpegPostProcessor):
super().__init__(downloader)
def concat_files(self, in_files, out_file):
if not self._downloader._ensure_dir_exists(out_file):
return
if len(in_files) == 1:
if os.path.realpath(in_files[0]) != os.path.realpath(out_file):
self.to_screen(f'Moving "{in_files[0]}" to "{out_file}"')