SEBWIN-450: Fixed issue with user data folder for WebView2.

This commit is contained in:
Damian Büchel 2021-05-11 20:02:54 +02:00
parent 2364b57f40
commit 590e152ea2

View file

@ -10,6 +10,7 @@ using System;
using System.IO;
using System.Reflection;
using System.Windows;
using Microsoft.Web.WebView2.Wpf;
using SafeExamBrowser.Configuration.Contracts;
using SafeExamBrowser.Core.Contracts.Notifications;
using SafeExamBrowser.Core.Contracts.Notifications.Events;
@ -150,6 +151,7 @@ namespace SafeExamBrowser.Proctoring
fileSystem.Save(content, filePath);
control = new ProctoringControl(logger.CloneFor(nameof(ProctoringControl)));
control.CreationProperties = new CoreWebView2CreationProperties { UserDataFolder = appConfig.TemporaryDirectory };
control.EnsureCoreWebView2Async().ContinueWith(_ =>
{
control.Dispatcher.Invoke(() =>