1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

MC greater than 0.9.7 plugin arch fixes

This commit is contained in:
Ryan Blenis 2021-09-19 22:50:00 -04:00
parent e5ff461867
commit 470a313ee7
2 changed files with 5 additions and 6 deletions

View file

@ -507,9 +507,8 @@ module.exports.pluginHandler = function (parent) {
obj.removePlugin = function (id, func) {
parent.db.getPlugin(id, function (err, docs) {
var plugin = docs[0];
var rimraf = require('rimraf');
let pluginPath = obj.parent.path.join(obj.pluginPath, plugin.shortName);
rimraf.sync(pluginPath);
obj.fs.rmdirSync(pluginPath, { recursive: true });
parent.db.deletePlugin(id, func);
delete obj.plugins[plugin.shortName];
});