Skip to content

Commit

Permalink
Actually ignore the logo (#139)
Browse files Browse the repository at this point in the history
* Actually ignore the logo

Fixed #136
  • Loading branch information
svrooij authored Nov 29, 2024
1 parent 68e3019 commit a68d293
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions src/WingetIntune/Intune/IntuneManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -691,14 +691,21 @@ private async Task WritePackageInfo(string packageFolder, PackageInfo packageInf

var win32App = mapper.ToWin32LobApp(packageInfo);
var logoPath = Path.Combine(packageFolder, "..", "logo.png");
var logoBytes = await fileManager.ReadAllBytesAsync(logoPath, cancellationToken);
if (logoBytes.Length > 0)
if (fileManager.FileExists(logoPath))
{
win32App.LargeIcon = new MimeContent
var logoBytes = await fileManager.ReadAllBytesAsync(logoPath, cancellationToken);
if (logoBytes.Length > 0)
{
Type = "image/png",
Value = logoBytes
};
win32App.LargeIcon = new MimeContent
{
Type = "image/png",
Value = logoBytes
};
}
}
else
{
logger.LogWarning("No logo found for {PackageId}, place your image at {LogoPath}", packageInfo.PackageIdentifier, Path.GetFullPath(logoPath));
}

using var stream = new MemoryStream();
Expand Down

0 comments on commit a68d293

Please sign in to comment.