Forbid forward slash in win32 file names (fixes issue #147)
authorRicardo Garcia <sarbalap+freshmeat@gmail.com>
Tue, 29 Jun 2010 09:10:12 +0000 (11:10 +0200)
committerRicardo Garcia <sarbalap+freshmeat@gmail.com>
Sun, 31 Oct 2010 10:28:17 +0000 (11:28 +0100)
youtube-dl

index 5e98dfde48310c4bf800158ebf7f81c0f6d747e8..ea4b3fded85fb0529d38e75e2ef500da20b28b15 100755 (executable)
@@ -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)