Remove a few superfluous/testing log statements, and print the
deletion debug messages when it occurs rather than earlier. Use
a nicer name for the isDirectory variable.
Upgrading plugins was broken for various reasons. There are four
fixes and a minor one:
1. Use a directory name based only on the `Name` of the plugin, not
the source filename, which contains the version. Avoids strange
duplication of the plugin.
2. Use the new directory name for the deletes if it's present, so
that installation and removal happen at that directory level
and we don't leave empty folders laying around. Ensures we
properly remove additional resources in plugins too, not just
the main `.dll` file.
3. Ignore the incoming `target` when installing, and always set
it ourself to the proper directory, which would matter when
reinstalling.
4. Deletes an existing target directory before installing if it
exists. Note that not calling any of the plugin removal code
is intentional; I suspect that would delete configurations
unexpectedly when upgrading which would be annoying. This way,
it just replaces the files and then reloads.
5. (Minor) Added some actual debug messages around the plugin
download section so failures can be more accurately seen.
This was added in #801 which broke the previous plugin install
behaviour. Previously plugins could be loaded from subdirectories
but this search was only for the highest level. Change it to search
all subdirectories instead to restore the previous behaviour.
Also modifies the same option from #934, though I'm not 100% sure
if this is needed here.
For the purposes of packaging, this makes more sense, since we can
include additional appends to this version (e.g. `-rcX`) when we
can't in the SharedVersion file. The previous commit to the
bump_version script sets this as well.
* Style changes
* Remove remnants of SMB support
* Use `GetInvalidFileNameChars` instead of rolling our own
* Remove possible unexpected behaviour with async file streams
* Remove some dead code