mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-14 07:53:48 +00:00
Made plugin root a static variable
This commit is contained in:
2 files changed
+4
-4
No files matched your search
@@ -59,11 +59,10 @@ public static partial class PluginFactory
|
||||
{
|
||||
await using var inputStream = resourceInfo.CreateReadStream();
|
||||
|
||||
var pluginsRoot = Path.Join(DATA_DIR, "plugins");
|
||||
var pluginTypeBasePath = Path.Join(pluginsRoot, metaData.Type.GetDirectory());
|
||||
var pluginTypeBasePath = Path.Join(PLUGINS_ROOT, metaData.Type.GetDirectory());
|
||||
|
||||
if (!Directory.Exists(pluginsRoot))
|
||||
Directory.CreateDirectory(pluginsRoot);
|
||||
if (!Directory.Exists(PLUGINS_ROOT))
|
||||
Directory.CreateDirectory(PLUGINS_ROOT);
|
||||
|
||||
if (!Directory.Exists(pluginTypeBasePath))
|
||||
Directory.CreateDirectory(pluginTypeBasePath);
|
||||
|
||||
@@ -8,6 +8,7 @@ public static partial class PluginFactory
|
||||
{
|
||||
private static readonly ILogger LOG = Program.LOGGER_FACTORY.CreateLogger("PluginFactory");
|
||||
private static readonly string DATA_DIR = SettingsManager.DataDirectory!;
|
||||
private static readonly string PLUGINS_ROOT = Path.Join(DATA_DIR, "plugins");
|
||||
|
||||
public static async Task LoadAll()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user