Use the right name to remove original file when adding.

(This is in (half-)dead code, but anyway.)
This commit is contained in:
ospalh 2012-10-18 11:28:28 +02:00
parent 7ab8419594
commit 1ecb0c4ecd

View file

@ -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