mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-11 09:47:21 +00:00
Adopted further C# 14 and .NET 10 features (#1158)
This commit is contained in:
1 parent
f649febf88
commit
f0fa1411c8
40 files changed
+545
-56
No files matched your search
@@ -64,7 +64,7 @@ public static partial class PluginFactory
|
||||
await response.Content.CopyToAsync(tempFileStream, cancellationToken);
|
||||
}
|
||||
|
||||
ExtractConfigPluginArchive(tempDownloadFile, stagedDirectory);
|
||||
await ExtractConfigPluginArchiveAsync(tempDownloadFile, stagedDirectory, cancellationToken);
|
||||
|
||||
var configDirectory = Path.Join(ENTERPRISE_CONFIGURATION_PLUGINS_ROOT, configPlugId.ToString());
|
||||
if (Directory.Exists(configDirectory))
|
||||
@@ -129,9 +129,9 @@ public static partial class PluginFactory
|
||||
return wasSuccessful;
|
||||
}
|
||||
|
||||
private static void ExtractConfigPluginArchive(string sourceArchiveFileName, string destinationDirectory)
|
||||
private static async Task ExtractConfigPluginArchiveAsync(string sourceArchiveFileName, string destinationDirectory, CancellationToken token)
|
||||
{
|
||||
PluginArchive.Extract(sourceArchiveFileName, destinationDirectory);
|
||||
await PluginArchive.ExtractAsync(sourceArchiveFileName, destinationDirectory, token);
|
||||
|
||||
if (!Directory.EnumerateFiles(destinationDirectory, "plugin.lua", SearchOption.AllDirectories).Any())
|
||||
throw new InvalidDataException("The enterprise configuration plugin archive does not contain a plugin.lua file.");
|
||||
|
||||
Reference in new issue
Block a user