mirror of
https://github.com/ytdl-org/youtube-dl
synced 2024-12-23 04:30:10 +09:00
Forbid forward slash in win32 file names (fixes issue #147)
This commit is contained in:
parent
de3ed1f84a
commit
ca6a11fa59
@ -99,7 +99,7 @@ def sanitize_open(filename, open_mode):
|
|||||||
return (stream, filename)
|
return (stream, filename)
|
||||||
except (IOError, OSError), err:
|
except (IOError, OSError), err:
|
||||||
# In case of error, try to remove win32 forbidden chars
|
# In case of error, try to remove win32 forbidden chars
|
||||||
filename = re.sub(ur'[<>:"\|\?\*]', u'#', filename)
|
filename = re.sub(ur'[/<>:"\|\?\*]', u'#', filename)
|
||||||
|
|
||||||
# An exception here should be caught in the caller
|
# An exception here should be caught in the caller
|
||||||
stream = open(filename, open_mode)
|
stream = open(filename, open_mode)
|
||||||
|
Loading…
Reference in New Issue
Block a user