fix(webview): cache Edge vide au demarrage, plus a la fermeture
TMS effacait EdgeCache dans son destructeur pendant que msedgewebview2 supprimait encore ses fichiers : EDirectoryNotFoundException (DIPS-wal) a la fermeture. AutoClearCache coupe ; l'app vide le dossier avant de creer le navigateur. Cinq lancements / fermetures sans erreur. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -295,7 +295,20 @@ begin
|
|||||||
// USE_EDGE_BROWSER} directive can swap the concrete class without a
|
// USE_EDGE_BROWSER} directive can swap the concrete class without a
|
||||||
// second .fmx variant. Align Client to fill the area below PanelTop
|
// second .fmx variant. Align Client to fill the area below PanelTop
|
||||||
// and above the (collapsible) PanelLog + Splitter.
|
// and above the (collapsible) PanelLog + Splitter.
|
||||||
|
// CACHE EFFACE AU DEMARRAGE, PAS A LA FERMETURE. TMS l'effacait dans son
|
||||||
|
// destructeur, pendant que les processus msedgewebview2 supprimaient encore
|
||||||
|
// leurs propres fichiers : un fichier disparu en cours de parcours
|
||||||
|
// (EBWebView\Default\DIPS-wal) levait EDirectoryNotFoundException, non
|
||||||
|
// rattrapee, a la fermeture. Ici aucun moteur ne tourne encore - la garde
|
||||||
|
// d'instance unique est passee dans le .dpr. Meme dossier que TMS :
|
||||||
|
// %TEMP%\<exe>\EdgeCache. Echec ignore : un cache reste un cache.
|
||||||
|
try
|
||||||
|
TDirectory.Delete(TPath.Combine(TPath.Combine(TPath.GetTempPath,
|
||||||
|
ChangeFileExt(ExtractFileName(ParamStr(0)), '')), 'EdgeCache'), True);
|
||||||
|
except
|
||||||
|
end;
|
||||||
WebBrowser := TWebBrowserClass.Create(Self);
|
WebBrowser := TWebBrowserClass.Create(Self);
|
||||||
|
WebBrowser.AutoClearCache := False;
|
||||||
// Wire events BEFORE Parent assignment: setting Parent triggers the
|
// Wire events BEFORE Parent assignment: setting Parent triggers the
|
||||||
// TMS browser's async WebView2 init, which fires OnInitialized when
|
// TMS browser's async WebView2 init, which fires OnInitialized when
|
||||||
// Edge Chromium is ready. If we assigned the handlers afterwards we'd
|
// Edge Chromium is ready. If we assigned the handlers afterwards we'd
|
||||||
|
|||||||
Reference in New Issue
Block a user