Skip to content

Commit

Permalink
fix: thumbnail name
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangkaihua88 committed May 29, 2022
1 parent d40e1bb commit 3f5f943
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ private string ExtractFile(string path)
{
foreach (ZipArchiveEntry entry in archive.Entries)
{
if (entry.FullName == "Thumbnails/thumbnail.png")
if (entry.FullName.Contains("thumbnail"))
{
string curAssemblyFolder = new Uri(System.Reflection.Assembly.GetExecutingAssembly().CodeBase).LocalPath;
curAssemblyFolder = Path.GetDirectoryName(curAssemblyFolder);
// Gets the full path to ensure that relative segments are removed.
string destinationPath = Path.GetFullPath(Path.Combine(curAssemblyFolder, "thumbnail.png"));
string destinationPath = Path.GetFullPath(Path.Combine(curAssemblyFolder, Path.GetFileName(entry.FullName)));
entry.ExtractToFile(destinationPath, true);
return destinationPath;
}
Expand Down

0 comments on commit 3f5f943

Please sign in to comment.