Signed-off-by: Brian Goff <cpuguy83@gmail.com>
| ... | ... |
@@ -630,11 +630,12 @@ func (pm *Manager) Remove(name string, config *types.PluginRmConfig) error {
|
| 630 | 630 |
return errors.Wrap(err, "error unmounting plugin data") |
| 631 | 631 |
} |
| 632 | 632 |
|
| 633 |
- if err := os.Rename(pluginDir, pluginDir+"-removing"); err != nil {
|
|
| 633 |
+ removeDir := pluginDir + "-removing" |
|
| 634 |
+ if err := os.Rename(pluginDir, removeDir); err != nil {
|
|
| 634 | 635 |
return errors.Wrap(err, "error performing atomic remove of plugin dir") |
| 635 | 636 |
} |
| 636 | 637 |
|
| 637 |
- if err := system.EnsureRemoveAll(pluginDir); err != nil {
|
|
| 638 |
+ if err := system.EnsureRemoveAll(removeDir); err != nil {
|
|
| 638 | 639 |
return errors.Wrap(err, "error removing plugin dir") |
| 639 | 640 |
} |
| 640 | 641 |
pm.config.Store.Remove(p) |