mirror of
https://github.com/ankitects/anki.git
synced 2025-09-23 16:26:40 -04:00
don't allow ? " or | in media filenames either
This commit is contained in:
parent
d401f92016
commit
7070b159d5
1 changed files with 1 additions and 1 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue