Merge pull request #29 from ospalh/fixes

Three fixes
This commit is contained in:
Damien Elmes 2012-10-18 18:53:06 -07:00
commit 2582e70031
2 changed files with 3 additions and 4 deletions

View file

@ -1130,8 +1130,7 @@ update cards set usn=?, mod=?, did=? where odid=0 and id in """ + ids2str(
field,
frm.ignoreCase.isChecked())
except sre_constants.error:
ui.utils.showInfo(_("Invalid regular expression."),
parent=self)
showInfo(_("Invalid regular expression."), parent=self)
return
else:
self.onSearch()

View file

@ -3,7 +3,7 @@
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
from aqt.qt import *
import re, os, sys, urllib2, ctypes, traceback, urllib2
import re, os, sys, urllib2, ctypes, traceback
from anki.utils import stripHTML, isWin, isMac, namedtmp, json
from anki.sound import play
from anki.hooks import runHook, runFilter
@ -789,7 +789,7 @@ please click the help button."""), help="cloze")
if canDelete and self.mw.pm.profile['deleteMedia']:
if os.path.abspath(name) != os.path.abspath(path):
try:
os.unlink(old)
os.unlink(path)
except:
pass
# return a local html link