0
0
Fork 0

Forbid forward slash in win32 file names (fixes issue #147)

main
Ricardo Garcia 2010-06-29 11:10:12 +02:00
parent de3ed1f84a
commit ca6a11fa59
1 changed files with 1 additions and 1 deletions

View File

@ -99,7 +99,7 @@ def sanitize_open(filename, open_mode):
return (stream, filename)
except (IOError, OSError), err:
# 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
stream = open(filename, open_mode)