]> jfr.im git - yt-dlp.git/commitdiff
[Concat] Ensure final directory exists
authorpukkandan <redacted>
Sat, 26 Mar 2022 23:22:11 +0000 (04:52 +0530)
committerpukkandan <redacted>
Sat, 26 Mar 2022 23:22:11 +0000 (04:52 +0530)
Fixes https://github.com/yt-dlp/yt-dlp/issues/3181#issuecomment-1079622589

yt_dlp/postprocessor/ffmpeg.py

index 234ddeff0624833b40ddd5ccac186fa2addcb908..ec618b0408b2e4947f2a81ab6332df110fde73c5 100644 (file)
@@ -1129,6 +1129,8 @@ def __init__(self, downloader, only_multi_video=False):
         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}"')