From 104b4b26805196bfb6c43327dac9bdf05b0d0266 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Sun, 29 Jun 2025 16:09:06 +0800 Subject: [PATCH] Improve code quality --- Flow.Launcher/Helper/PluginInstallationHelper.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Flow.Launcher/Helper/PluginInstallationHelper.cs b/Flow.Launcher/Helper/PluginInstallationHelper.cs index d7ce2934c..0d3d2df67 100644 --- a/Flow.Launcher/Helper/PluginInstallationHelper.cs +++ b/Flow.Launcher/Helper/PluginInstallationHelper.cs @@ -98,9 +98,7 @@ public static class PluginInstallationHelper try { using ZipArchive archive = ZipFile.OpenRead(filePath); - var pluginJsonPath = archive.Entries.FirstOrDefault(x => x.Name == "plugin.json") ?? - throw new FileNotFoundException("The zip file does not contain a plugin.json file."); - var pluginJsonEntry = archive.GetEntry(pluginJsonPath.ToString()) ?? + var pluginJsonEntry = archive.Entries.FirstOrDefault(x => x.Name == "plugin.json") ?? throw new FileNotFoundException("The zip file does not contain a plugin.json file."); using Stream stream = pluginJsonEntry.Open();