mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-09 12:46:47 +02:00
[SVGThumbnails]Fix hanging loop and add logs (#31116)
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
// See the LICENSE file in the project root for more information.
|
// See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
using ManagedCommon;
|
||||||
|
|
||||||
namespace Microsoft.PowerToys.ThumbnailHandler.Svg
|
namespace Microsoft.PowerToys.ThumbnailHandler.Svg
|
||||||
{
|
{
|
||||||
@@ -17,6 +18,7 @@ namespace Microsoft.PowerToys.ThumbnailHandler.Svg
|
|||||||
public static void Main(string[] args)
|
public static void Main(string[] args)
|
||||||
{
|
{
|
||||||
ApplicationConfiguration.Initialize();
|
ApplicationConfiguration.Initialize();
|
||||||
|
Logger.InitializeLogger("\\FileExplorer_localLow\\SvgThumbnails\\logs", true);
|
||||||
if (args != null)
|
if (args != null)
|
||||||
{
|
{
|
||||||
if (args.Length == 2)
|
if (args.Length == 2)
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ using System.Reflection;
|
|||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using Common.Utilities;
|
using Common.Utilities;
|
||||||
|
using ManagedCommon;
|
||||||
using Microsoft.Web.WebView2.Core;
|
using Microsoft.Web.WebView2.Core;
|
||||||
using Microsoft.Web.WebView2.WinForms;
|
using Microsoft.Web.WebView2.WinForms;
|
||||||
|
|
||||||
@@ -197,8 +198,10 @@ namespace Microsoft.PowerToys.ThumbnailHandler.Svg
|
|||||||
_browser.NavigateToString(SvgContents);
|
_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\GPOWrapper\GPOWrapper.vcxproj" />
|
||||||
<ProjectReference Include="..\..\..\common\ManagedTelemetry\Telemetry\ManagedTelemetry.csproj" />
|
<ProjectReference Include="..\..\..\common\ManagedTelemetry\Telemetry\ManagedTelemetry.csproj" />
|
||||||
<ProjectReference Include="..\Common\PreviewHandlerCommon.csproj" />
|
<ProjectReference Include="..\Common\PreviewHandlerCommon.csproj" />
|
||||||
|
<ProjectReference Include="..\..\..\common\Common.UI\Common.UI.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
Reference in New Issue
Block a user