don't allow ? " or | in media filenames either

This commit is contained in:
Damien Elmes 2012-04-24 09:16:34 +09:00
parent d401f92016
commit 7070b159d5

View file

@ -65,7 +65,7 @@ class MediaManager(object):
If the same name exists, compare checksums."""
mdir = self.dir()
# remove any dangerous characters
base = re.sub(r"[][<>:/\\&]", "", os.path.basename(opath))
base = re.sub(r"[][<>:/\\&?\"\|]", "", os.path.basename(opath))
dst = os.path.join(mdir, base)
# if it doesn't exist, copy it directly
if not os.path.exists(dst):