From 1ecb0c4ecd5178f8bf104b594f9e5b80fe621b9c Mon Sep 17 00:00:00 2001 From: ospalh Date: Thu, 18 Oct 2012 11:28:28 +0200 Subject: [PATCH] Use the right name to remove original file when adding. (This is in (half-)dead code, but anyway.) --- aqt/editor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aqt/editor.py b/aqt/editor.py index 2dfab13f5..48890ad6a 100644 --- a/aqt/editor.py +++ b/aqt/editor.py @@ -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