mirror of
https://codeberg.org/PLG-Development/PLG-MuDiCS
synced 2026-07-05 16:37:09 +00:00
fix: couldn't open control & display at the same time
This commit is contained in:
@@ -8,14 +8,14 @@ import (
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
func OpenBrowserWindow(url string, fullscreen bool) error {
|
||||
func OpenBrowserWindow(url string, fullscreen bool, profile string) error {
|
||||
bins := []string{"chromium", "chromium-browser"}
|
||||
|
||||
home, err := os.UserHomeDir()
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to determine user home directory: %w", err)
|
||||
}
|
||||
browserProfileDirPath := filepath.Join(home, ".local", "share", "plg-mudics", "browser")
|
||||
browserProfileDirPath := filepath.Join(home, ".local", "share", "plg-mudics", fmt.Sprintf("browser-%s", profile))
|
||||
if err := os.MkdirAll(browserProfileDirPath, os.ModePerm); err != nil {
|
||||
return fmt.Errorf("failed to create local config directory: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user