Explorar o código

[downloader/fragment] Encode filename of fragment being removed (closes #15020)

Sergey M․ %!s(int64=7) %!d(string=hai) anos
pai
achega
99081da90c
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      youtube_dl/downloader/fragment.py

+ 1 - 1
youtube_dl/downloader/fragment.py

@@ -112,7 +112,7 @@ class FragmentFD(FileDownloader):
             if self.__do_ytdl_file(ctx):
                 self._write_ytdl_file(ctx)
             if not self.params.get('keep_fragments', False):
-                os.remove(ctx['fragment_filename_sanitized'])
+                os.remove(encodeFilename(ctx['fragment_filename_sanitized']))
             del ctx['fragment_filename_sanitized']
 
     def _prepare_frag_download(self, ctx):