mirror of
https://github.com/l1ving/youtube-dl
synced 2025-02-02 00:52:58 +08:00
Strip the filename of beginning and end whitespace
This commit is contained in:
parent
3148e70723
commit
39a4144527
@ -370,7 +370,7 @@ class FileDownloader(object):
|
|||||||
if len(filename) > max_filelen:
|
if len(filename) > max_filelen:
|
||||||
self.to_screen("[filename] Too long, truncating")
|
self.to_screen("[filename] Too long, truncating")
|
||||||
start_char = len(filename) - max_filelen + 1
|
start_char = len(filename) - max_filelen + 1
|
||||||
filename = filename[start_char:]
|
filename = filename[start_char:].strip()
|
||||||
|
|
||||||
return self.real_download(filename, info_dict)
|
return self.real_download(filename, info_dict)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user