pksunkara / electron-plugin-manager

Plugin Manager based on NPM for Electron apps
MIT License
8 stars 3 forks source link

Uninstall deletes whole plugins directory #80

Closed macinspak closed 3 years ago

macinspak commented 3 years ago

Hi, found a new one today. I am doing this:

// In renderer process
ipcRenderer.on('epm-uninstalled-is-number', (event, err) => {
  // ...
});

ipcRenderer.send('epm-uninstall', dir, 'is-number');
// Response sent to `epm-uninstalled-${name}` channel where `name` is the plugin name

Exactly using that syntax, and my plugins directory is "plugins", and had other plugins in it. But this command deleted the entire plugs directory (and all plugins!).

pksunkara commented 3 years ago

I am unable to reproduce this. Did you send ipcRenderer.send('epm-uninstall', dir, '')? That would delete the whole plugins folder. I am going to add tests to make sure plugins folder exist after deleting.