]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[downloader/fragment] Encode filename of fragment being removed (closes #15020)
authorSergey M․ <dstftw@gmail.com>
Sun, 17 Dec 2017 20:31:53 +0000 (03:31 +0700)
committerSergey M․ <dstftw@gmail.com>
Sun, 17 Dec 2017 20:31:53 +0000 (03:31 +0700)
youtube_dl/downloader/fragment.py

index 7bb61a5414f7098e533b5dcc87a5c3f6102062aa..ea5e3a4b5df9f957328557b6f822ef5494cfc9a6 100644 (file)
@@ -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):