yoshiask / FluentStore

A unifying frontend for Windows app stores and package managers
Mozilla Public License 2.0
370 stars 19 forks source link

Attempting to reinstall a plugin can corrupt the plugin #49

Closed yoshiask closed 2 years ago

yoshiask commented 2 years ago

Before you start...

What windows are you seeing the problem on?

Windows 11, Windows 11 Dev

What OS/App version/architecture are you seeing the problem on?

Observed on 0.3.2, likely affect all 0.3.x releases (the ones that use the more intelligent PluginLoader)

Description

PluginLoader blindly attempts to delete the extracted plugin if it already exists, without checking to see if files in the the directory are in use. This means that most of the plugin's files get deleted, without the new plugin replacing it. This breaks the currently installed plugin, and fails to install the new plugin. The only way to get out of this corrupted state is to manually delete the corrupted plugin and reattempt the install.

Steps To Reproduce

  1. Go to app settings
  2. Go to the plugins tab
  3. Select the "Install a plugin" option
  4. Pick a ZIP file for a plugin that is already loaded
  5. Observe that the

Expected behavior

PluginLoader should delete the existing plugin if it can, else it should save the ZIP archive in the plugin directory so the install can be completed when the app restarts.

Relevant Assets

No response