[SVGThumbnails]Fix hanging loop and add logs (#31116)

This commit is contained in:
Jaime Bernardo 2024-01-24 15:27:42 +00:00 коммит произвёл GitHub
Родитель 172db3af63
Коммит 6f5a59b20d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
3 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -3,6 +3,7 @@
// See the LICENSE file in the project root for more information.
using System.Globalization;
using ManagedCommon;
namespace Microsoft.PowerToys.ThumbnailHandler.Svg
{
@ -17,6 +18,7 @@ namespace Microsoft.PowerToys.ThumbnailHandler.Svg
public static void Main(string[] args)
{
ApplicationConfiguration.Initialize();
Logger.InitializeLogger("\\FileExplorer_localLow\\SvgThumbnails\\logs", true);
if (args != null)
{
if (args.Length == 2)

Просмотреть файл

@ -7,6 +7,7 @@ using System.Reflection;
using System.Runtime.CompilerServices;
using System.Threading;
using Common.Utilities;
using ManagedCommon;
using Microsoft.Web.WebView2.Core;
using Microsoft.Web.WebView2.WinForms;
@ -197,8 +198,10 @@ namespace Microsoft.PowerToys.ThumbnailHandler.Svg
_browser.NavigateToString(SvgContents);
}
}
catch (Exception)
catch (Exception ex)
{
Logger.LogError($"Failed running webView2Environment completed for {FilePath} : ", ex);
thumbnailDone.Set();
}
});

Просмотреть файл

@ -52,5 +52,6 @@
<ProjectReference Include="..\..\..\common\GPOWrapper\GPOWrapper.vcxproj" />
<ProjectReference Include="..\..\..\common\ManagedTelemetry\Telemetry\ManagedTelemetry.csproj" />
<ProjectReference Include="..\Common\PreviewHandlerCommon.csproj" />
<ProjectReference Include="..\..\..\common\Common.UI\Common.UI.csproj" />
</ItemGroup>
</Project>