chore: always respect the manifest name

This commit is contained in:
goat 2022-08-21 15:41:53 +02:00
parent 9c03bc0fe6
commit 3f76a70425
No known key found for this signature in database
GPG key ID: 7773BB5B43BA52E5
5 changed files with 6 additions and 10 deletions

View file

@ -182,7 +182,7 @@ internal class LocalPlugin : IDisposable
/// <summary>
/// Gets the plugin name, directly from the plugin or if it is not loaded from the manifest.
/// </summary>
public string Name => this.instance?.Name ?? this.Manifest.Name;
public string Name => this.Manifest.Name;
/// <summary>
/// Gets an optional reason, if the plugin is banned.
@ -427,7 +427,7 @@ internal class LocalPlugin : IDisposable
SignatureHelper.Initialise(this.instance);
// In-case the manifest name was a placeholder. Can occur when no manifest was included.
if (this.instance.Name != this.Manifest.Name)
if (this.Manifest.Name.IsNullOrEmpty())
{
this.Manifest.Name = this.instance.Name;
this.Manifest.Save(this.manifestFile);