# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1593043248 0 # Node ID 589896c07c91c9535a72be9a13b6c2ac3de939f1 # Parent 7ba8c8ff548f46db44663ffd7e22b0d744ec85fe Win: Use GetTempPathW() to get a location for the embedded Edge (Chromium) data. This allows apps to run from \Program Files\ since the apps can't normally write to this location, prior to this change trying to open a web view would fail after install. diff -r 7ba8c8ff548f -r 589896c07c91 win/edge.cpp --- a/win/edge.cpp Wed Jun 24 02:27:28 2020 +0000 +++ b/win/edge.cpp Thu Jun 25 00:00:48 2020 +0000 @@ -226,7 +226,11 @@ BOOL EdgeBrowser::Detect(VOID) { - CreateCoreWebView2EnvironmentWithOptions(nullptr, nullptr, nullptr, + WCHAR tempdir[MAX_PATH+1]; + + GetTempPathW(MAX_PATH, tempdir); + + CreateCoreWebView2EnvironmentWithOptions(nullptr, tempdir, nullptr, Callback( [this](HRESULT result, ICoreWebView2Environment* env) -> HRESULT { // Successfully created Edge environment, return TRUE