mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
don't die if a user redownloads a disabled plugin
This commit is contained in:
parent
37ea235b3d
commit
ae2b1592dc
1 changed files with 4 additions and 1 deletions
|
@ -2694,7 +2694,10 @@ to work with this version of Anki."""))
|
||||||
for p in plugins:
|
for p in plugins:
|
||||||
path = os.path.join(dir, p[0])
|
path = os.path.join(dir, p[0])
|
||||||
if os.path.exists(path):
|
if os.path.exists(path):
|
||||||
os.rename(path, path.replace(".py", ".disabled"))
|
new = path.replace(".py", ".disabled")
|
||||||
|
if os.path.exists(new):
|
||||||
|
os.unlink(new)
|
||||||
|
os.rename(path, new)
|
||||||
ui.utils.showInfo(p[1])
|
ui.utils.showInfo(p[1])
|
||||||
|
|
||||||
def rebuildPluginsMenu(self):
|
def rebuildPluginsMenu(self):
|
||||||
|
|
Loading…
Reference in a new issue