From 83a7e4ce24238a008af57e5f5c483034b552a1d0 Mon Sep 17 00:00:00 2001 From: zznty <94796179+zznty@users.noreply.github.com> Date: Wed, 26 Apr 2023 17:00:50 +0700 Subject: [PATCH] fix plugin uploading --- TorchRemote.Plugin/Controllers/PluginsController.cs | 2 +- TorchRemote.Plugin/Utils/PluginManifestUtils.cs | 2 +- TorchRemote.Plugin/manifest.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/TorchRemote.Plugin/Controllers/PluginsController.cs b/TorchRemote.Plugin/Controllers/PluginsController.cs index 4ddb63b..88631f9 100644 --- a/TorchRemote.Plugin/Controllers/PluginsController.cs +++ b/TorchRemote.Plugin/Controllers/PluginsController.cs @@ -61,6 +61,6 @@ public class PluginsController : WebApiController file.Data.CopyTo(zipStream); return new PluginInfo(manifest.Guid, manifest.Name, manifest.Version); - }); + }).ToArray(); } } \ No newline at end of file diff --git a/TorchRemote.Plugin/Utils/PluginManifestUtils.cs b/TorchRemote.Plugin/Utils/PluginManifestUtils.cs index 0979f81..ca276fe 100644 --- a/TorchRemote.Plugin/Utils/PluginManifestUtils.cs +++ b/TorchRemote.Plugin/Utils/PluginManifestUtils.cs @@ -16,7 +16,7 @@ public static class PluginManifestUtils public static PluginManifest ReadFromZip(Stream stream) { - using var archive = new ZipArchive(stream); + using var archive = new ZipArchive(stream, ZipArchiveMode.Read, true); using var entryStream = archive.GetEntry("manifest.xml")!.Open(); return Read(entryStream); } diff --git a/TorchRemote.Plugin/manifest.xml b/TorchRemote.Plugin/manifest.xml index 92aa12b..7fd2955 100644 --- a/TorchRemote.Plugin/manifest.xml +++ b/TorchRemote.Plugin/manifest.xml @@ -2,5 +2,5 @@ Torch Remote 284017F3-9682-4841-A544-EB04DB8CB9BA - v1.0.11 + v1.0.13 \ No newline at end of file