From 3c36ddfb82291c448abe3047986c652eef89ba93 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 10 Feb 2014 20:47:49 +0900 Subject: [PATCH] don't allow files named . or .. --- anki/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/anki/utils.py b/anki/utils.py index 06be1de67..8b5dc5a7c 100644 --- a/anki/utils.py +++ b/anki/utils.py @@ -360,6 +360,8 @@ def invalidFilename(str, dirsep=True): return "/" elif (dirsep or not isWin) and "\\" in str: return "\\" + elif str.strip().startswith("."): + return "." def platDesc(): # we may get an interrupted system call, so try this in a loop