From db5f31732a9868c1e9e4f9a49be70b794ff82d4f Mon Sep 17 00:00:00 2001 From: Brian Goff Date: Sat, 27 May 2017 12:30:37 -0400 Subject: [PATCH] Don't unmount entire plugin manager tree on remove This was mistakenly unmounting everything under `plugins/*` instead of just `plugins//*` anytime a plugin is removed. Signed-off-by: Brian Goff --- plugin/backend_linux.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/backend_linux.go b/plugin/backend_linux.go index 4329983029..1d7f3a838c 100644 --- a/plugin/backend_linux.go +++ b/plugin/backend_linux.go @@ -633,8 +633,8 @@ func (pm *Manager) Remove(name string, config *types.PluginRmConfig) error { id := p.GetID() pm.config.Store.Remove(p) pluginDir := filepath.Join(pm.config.Root, id) - if err := recursiveUnmount(pm.config.Root); err != nil { - logrus.WithField("dir", pm.config.Root).WithField("id", id).Warn(err) + if err := recursiveUnmount(pluginDir); err != nil { + logrus.WithField("dir", pluginDir).WithField("id", id).Warn(err) } if err := os.RemoveAll(pluginDir); err != nil { logrus.Warnf("unable to remove %q from plugin remove: %v", pluginDir, err)