mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-28 19:39:19 +01:00
fix: add flag for testing plugins, don't load testing plugins if testing is disabled
This commit is contained in:
parent
770363e2d2
commit
e498da8079
2 changed files with 15 additions and 1 deletions
|
|
@ -93,12 +93,18 @@ namespace Dalamud.Plugin
|
|||
|
||||
// If this entire folder has been marked as a disabled plugin, don't even try to load anything
|
||||
var disabledFile = new FileInfo(Path.Combine(dllFile.Directory.FullName, ".disabled"));
|
||||
if (disabledFile.Exists && !raw) // should raw/dev plugins really not respect this?
|
||||
if (disabledFile.Exists && !raw) // should raw/dev plugins really not respect this?
|
||||
{
|
||||
Log.Information("Plugin {0} is disabled.", dllFile.FullName);
|
||||
return false;
|
||||
}
|
||||
|
||||
var testingFile = new FileInfo(Path.Combine(dllFile.Directory.FullName, ".testing"));
|
||||
if (testingFile.Exists && this.dalamud.Configuration.DoPluginTest) {
|
||||
Log.Information("Plugin {0} was testing, but testing is disabled.", dllFile.FullName);
|
||||
return false;
|
||||
}
|
||||
|
||||
// read the plugin def if present - again, fail before actually trying to load the dll if there is a problem
|
||||
var defJsonFile = new FileInfo(Path.Combine(dllFile.Directory.FullName, $"{Path.GetFileNameWithoutExtension(dllFile.Name)}.json"));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue