DioxusLabs / dioxus

Fullstack GUI library for web, desktop, mobile, and more.
https://dioxuslabs.com
Apache License 2.0
18.5k stars 703 forks source link

Change default location of WebView2 folder on Windows #2304

Open stefnotch opened 2 weeks ago

stefnotch commented 2 weeks ago

Problem

Dioxus desktop currently creates a <application name>.exe.WebView2 upon startup. (e.g. https://github.com/DioxusLabs/dioxus/issues/966 )

However, it creates that folder right next to the .exe file, which is unusual. This becomes worse when one places it in a usually somewhat restricted folder, like a C:\Program Files folder.

When working in a multi-user setup (rare, but it happens in companies or schools), then this becomes even more important. Then, it's important to separate executables from user data. One doesn't want to accidentally leak the private data of one user to another user on the same PC.

Steps To Reproduce

Steps to reproduce the behavior:

Expected behavior

I would have expected Dioxus desktop to automatically pick an appropriate folder, either AppData/Roaming or AppData/Local.

stefnotch commented 2 weeks ago

(Damn, that's arguably an upstream issue. Feel free to open issues in upstream libraries, because I really do believe that this could be problematic. For example, Tauri really enjoys this whole security aspect. Kinda sucks if they ever were to accidentally leak info from one user to another through this vector.)