mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
fix: don't throw when enabling an already enabled plugin (needed for orphans)
This commit is contained in:
parent
e225f4df0e
commit
2849613d79
1 changed files with 5 additions and 2 deletions
|
|
@ -570,8 +570,11 @@ internal class LocalPlugin : IDisposable
|
|||
throw new ArgumentOutOfRangeException(this.State.ToString());
|
||||
}
|
||||
|
||||
if (!this.Manifest.Disabled)
|
||||
throw new InvalidPluginOperationException($"Unable to enable {this.Name}, not disabled");
|
||||
// NOTE(goat): This is inconsequential, and we do have situations where a plugin can end up enabled but not loaded:
|
||||
// Orphaned plugins can have their repo added back, but may not have been loaded at boot and may still be enabled.
|
||||
// We don't want to disable orphaned plugins when they are orphaned so this is how it's going to be.
|
||||
// if (!this.Manifest.Disabled)
|
||||
// throw new InvalidPluginOperationException($"Unable to enable {this.Name}, not disabled");
|
||||
|
||||
this.Manifest.Disabled = false;
|
||||
this.Manifest.ScheduledForDeletion = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue