diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index c0ccc4d1c..2ecd5fb1d 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -203,7 +203,12 @@ def sanitize_filename(s): s = re.sub(ur' *[:\|] *', u' - ', s) s = re.sub(ur'[/<>"\?\*]', u'', s) - return u''.join(map(replace_insane, s)).strip('_') + s = u''.join(map(replace_insane, s)).strip('_') + + if sys.platform == 'win32': + s = s.replace(u'_', u' '); + + return s def orderedSet(iterable): """ Remove all duplicates from the input iterable """