From 39a4144527666a6642713be600281e40bf196195 Mon Sep 17 00:00:00 2001 From: The Stranjer <791672+TheStranjer@users.noreply.github.com> Date: Sun, 31 May 2020 14:03:46 -0400 Subject: [PATCH] Strip the filename of beginning and end whitespace --- youtube_dl/downloader/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/downloader/common.py b/youtube_dl/downloader/common.py index 2dc645a2f..e583de635 100644 --- a/youtube_dl/downloader/common.py +++ b/youtube_dl/downloader/common.py @@ -370,7 +370,7 @@ class FileDownloader(object): if len(filename) > max_filelen: self.to_screen("[filename] Too long, truncating") start_char = len(filename) - max_filelen + 1 - filename = filename[start_char:] + filename = filename[start_char:].strip() return self.real_download(filename, info_dict)