From a6c591edf9da70221945628bce9f9a2f5935c4e8 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 11 Dec 2010 02:22:54 +0900 Subject: [PATCH] copy+paste / drag+drag use 'paste' as temp file prefix --- ankiqt/ui/facteditor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ankiqt/ui/facteditor.py b/ankiqt/ui/facteditor.py index 45441ddee..0030e1ebe 100644 --- a/ankiqt/ui/facteditor.py +++ b/ankiqt/ui/facteditor.py @@ -1089,7 +1089,7 @@ class FactEdit(QTextEdit): 'User-Agent': 'Mozilla/5.0 (compatible; Anki/%s)' % ankiqt.appVersion }) filecontents = urllib2.urlopen(req).read() - (fd, name) = tempfile.mkstemp(prefix="anki", suffix=".%s" % + (fd, name) = tempfile.mkstemp(prefix="paste", suffix=".%s" % ext.encode("ascii")) file = os.fdopen(fd, "wb") file.write(filecontents)