Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions Plugins/Flow.Launcher.Plugin.PluginsManager/Utilities.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
using Flow.Launcher.Core.ExternalPlugins;
using Flow.Launcher.Infrastructure.UserSettings;
using ICSharpCode.SharpZipLib.Zip;
using Newtonsoft.Json;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Text.Json;

namespace Flow.Launcher.Plugin.PluginsManager
{
Expand Down Expand Up @@ -72,12 +71,10 @@ internal static UserPlugin GetPluginInfoFromZip(string filePath)

if (pluginJsonEntry != null)
{
using (StreamReader reader = new StreamReader(pluginJsonEntry.Open()))
{
string pluginJsonContent = reader.ReadToEnd();
plugin = JsonConvert.DeserializeObject<UserPlugin>(pluginJsonContent);
plugin.IcoPath = "Images\\zipfolder.png";
}
using StreamReader reader = new StreamReader(pluginJsonEntry.Open());
string pluginJsonContent = reader.ReadToEnd();
plugin = JsonSerializer.Deserialize<UserPlugin>(pluginJsonContent);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remember there's an overload for stream directly so we don't need to read it as string before deserializing it

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, please check.

plugin.IcoPath = "Images\\zipfolder.png";
}
}

Expand Down
Loading