webui-dev / webui

Use any web browser or WebView as GUI, with your preferred language in the backend and modern web technologies in the frontend, all in a lightweight portable library.
https://webui.me
MIT License
2.63k stars 157 forks source link

`webui_set_profile`: An empty `name` and `path` means the default user profile. #239

Closed fibodevy closed 9 months ago

fibodevy commented 9 months ago

If empty name/path is set, webui_show fails.

webui_set_profile:

    win->custom_profile = true;

_webui_browser_start_chrome:

    if (!_webui_browser_create_new_profile(win, Chrome))
        return false;

_webui_browser_create_new_profile:

    if (!win->custom_profile) {
        // <cut>
    }
    else {

        // Custom profile settings
        if (_webui_is_empty(win->profile_path) || _webui_is_empty(win->profile_name))
            return false;
    }
hassandraga commented 9 months ago

Fix: https://github.com/webui-dev/webui/commit/7da06778519070e2850c4c0d7b173d290f99087a Same as: https://github.com/webui-dev/webui/issues/240