mirror of
				https://github.com/MindWorkAI/AI-Studio.git
				synced 2025-11-04 04:20:20 +00:00 
			
		
		
		
	Made plugin root a static variable
This commit is contained in:
		
							parent
							
								
									e10cf4171b
								
							
						
					
					
						commit
						c375f11441
					
				@ -59,11 +59,10 @@ public static partial class PluginFactory
 | 
				
			|||||||
    {
 | 
					    {
 | 
				
			||||||
        await using var inputStream = resourceInfo.CreateReadStream();
 | 
					        await using var inputStream = resourceInfo.CreateReadStream();
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        var pluginsRoot = Path.Join(DATA_DIR, "plugins");
 | 
					        var pluginTypeBasePath = Path.Join(PLUGINS_ROOT, metaData.Type.GetDirectory());
 | 
				
			||||||
        var pluginTypeBasePath = Path.Join(pluginsRoot, metaData.Type.GetDirectory());
 | 
					 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        if (!Directory.Exists(pluginsRoot))
 | 
					        if (!Directory.Exists(PLUGINS_ROOT))
 | 
				
			||||||
            Directory.CreateDirectory(pluginsRoot);
 | 
					            Directory.CreateDirectory(PLUGINS_ROOT);
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        if (!Directory.Exists(pluginTypeBasePath))
 | 
					        if (!Directory.Exists(pluginTypeBasePath))
 | 
				
			||||||
            Directory.CreateDirectory(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 ILogger LOG = Program.LOGGER_FACTORY.CreateLogger("PluginFactory");
 | 
				
			||||||
    private static readonly string DATA_DIR = SettingsManager.DataDirectory!;
 | 
					    private static readonly string DATA_DIR = SettingsManager.DataDirectory!;
 | 
				
			||||||
 | 
					    private static readonly string PLUGINS_ROOT = Path.Join(DATA_DIR, "plugins");
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    public static async Task LoadAll()
 | 
					    public static async Task LoadAll()
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user