microsoft / microsoft-performance-toolkit-sdk

Software Development Kit for the Microsoft Performance ToolKit
MIT License
156 stars 55 forks source link

Prevent installing plugin over previous installation folder #348

Closed mslukebo closed 8 months ago

mslukebo commented 8 months ago

Adds a new IPluginValidator that checks to make sure the plugin installation folder does not yet exist. This new validator is passed only to the plugins installer.

Also fixes logic in the obsolete plugin remover to

  1. Only attempt to delete each directory once (before, it was calling DeleteDirectory multiple times due to a multiple enumeration of an IEnumerable containing the task)
  2. Prevent directories from being only partially removed if another process is using one or more of its files