Skip to content
Permalink
Browse files
fix #2356
  • Loading branch information
ralsina committed Jun 3, 2016
1 parent 6cf7744 commit 296fef7821873a8fe499a9371ded6d2e97e3efa7
Showing with 9 additions and 5 deletions.
  1. +1 −0 CHANGES.txt
  2. +8 −5 nikola/plugins/command/plugin.py
@@ -11,6 +11,7 @@ Features
Bugfixes
--------

* Fix plugin removal for plugins that are a package (Issue #2356)
* Reload English messages for every theme to prevent caching (Issue #2347)
* Cache theme messages after loading once (Issue #2344)
* Add ``<link>`` tags to other languages even if the post is
@@ -296,12 +296,15 @@ def do_install(self, url, name, show_install_notes=True):
def do_uninstall(self, name):
"""Uninstall a plugin."""
for plugin in self.site.plugin_manager.getAllPlugins(): # FIXME: this is repeated thrice
p = plugin.path
if os.path.isdir(p):
p = p + os.sep
else:
p = os.path.dirname(p)
if name == plugin.name: # Uninstall this one
p = plugin.path
if os.path.isdir(p):
# Plugins that have a package in them need to delete parent
# Issue #2356
p = p + os.sep
p = os.path.abspath(os.path.join(p, os.pardir))
else:
p = os.path.dirname(p)
LOGGER.warning('About to uninstall plugin: {0}'.format(name))
LOGGER.warning('This will delete {0}'.format(p))
sure = utils.ask_yesno('Are you sure?')

0 comments on commit 296fef7

Please sign in to comment.