mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-04-28 08:19:47 +00:00
Refactor variable names for clarity
This commit is contained in:
parent
fe9e7ea5bf
commit
1c4da1c5d7
@ -40,15 +40,15 @@ public static partial class PluginFactory
|
||||
}
|
||||
|
||||
// Ensure that the additional resources exist:
|
||||
foreach (var content in resourceFileProvider.GetDirectoryContents(metaData.ResourcePath))
|
||||
foreach (var contentFilePath in resourceFileProvider.GetDirectoryContents(metaData.ResourcePath))
|
||||
{
|
||||
if(content.IsDirectory)
|
||||
if(contentFilePath.IsDirectory)
|
||||
{
|
||||
LOG.LogError("The plugin contains a directory. This is not allowed.");
|
||||
continue;
|
||||
}
|
||||
|
||||
await CopyInternalPluginFile(content, metaData);
|
||||
await CopyInternalPluginFile(contentFilePath, metaData);
|
||||
}
|
||||
}
|
||||
catch
|
||||
@ -57,9 +57,9 @@ public static partial class PluginFactory
|
||||
}
|
||||
}
|
||||
|
||||
private static async Task CopyInternalPluginFile(IFileInfo resourceInfo, InternalPluginData metaData)
|
||||
private static async Task CopyInternalPluginFile(IFileInfo resourceFilePath, InternalPluginData metaData)
|
||||
{
|
||||
await using var inputStream = resourceInfo.CreateReadStream();
|
||||
await using var inputStream = resourceFilePath.CreateReadStream();
|
||||
|
||||
var pluginTypeBasePath = Path.Join(INTERNAL_PLUGINS_ROOT, metaData.Type.GetDirectory());
|
||||
|
||||
@ -73,7 +73,7 @@ public static partial class PluginFactory
|
||||
if (!Directory.Exists(pluginPath))
|
||||
Directory.CreateDirectory(pluginPath);
|
||||
|
||||
var pluginFilePath = Path.Join(pluginPath, resourceInfo.Name);
|
||||
var pluginFilePath = Path.Join(pluginPath, resourceFilePath.Name);
|
||||
|
||||
await using var outputStream = File.Create(pluginFilePath);
|
||||
await inputStream.CopyToAsync(outputStream);
|
||||
|
Loading…
Reference in New Issue
Block a user