From 95b4c4c766bc07b77285f7e7a0e525d35c6b08d0 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Fri, 10 Jan 2025 13:34:10 +0800 Subject: [PATCH] Improve code quality --- Plugins/Flow.Launcher.Plugin.PluginsManager/Utilities.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.PluginsManager/Utilities.cs b/Plugins/Flow.Launcher.Plugin.PluginsManager/Utilities.cs index 19f911818fc..743f5b25bff 100644 --- a/Plugins/Flow.Launcher.Plugin.PluginsManager/Utilities.cs +++ b/Plugins/Flow.Launcher.Plugin.PluginsManager/Utilities.cs @@ -71,9 +71,8 @@ internal static UserPlugin GetPluginInfoFromZip(string filePath) if (pluginJsonEntry != null) { - using StreamReader reader = new StreamReader(pluginJsonEntry.Open()); - string pluginJsonContent = reader.ReadToEnd(); - plugin = JsonSerializer.Deserialize(pluginJsonContent); + using Stream stream = pluginJsonEntry.Open(); + plugin = JsonSerializer.Deserialize(stream); plugin.IcoPath = "Images\\zipfolder.png"; } }