Fix Profile Directory file:// URI for Windows
This commit is contained in:
parent
53123dff1d
commit
99c93dc174
|
@ -1,6 +1,8 @@
|
||||||
package windows
|
package windows
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"strings"
|
||||||
|
|
||||||
"git.kirsle.net/apps/doodle/pkg/balance"
|
"git.kirsle.net/apps/doodle/pkg/balance"
|
||||||
"git.kirsle.net/apps/doodle/pkg/log"
|
"git.kirsle.net/apps/doodle/pkg/log"
|
||||||
"git.kirsle.net/apps/doodle/pkg/native"
|
"git.kirsle.net/apps/doodle/pkg/native"
|
||||||
|
@ -274,7 +276,11 @@ func (c Settings) makeOptionsTab(Width, Height int) *ui.Frame {
|
||||||
{
|
{
|
||||||
Label: "Open profile directory",
|
Label: "Open profile directory",
|
||||||
Fn: func() {
|
Fn: func() {
|
||||||
native.OpenURL("file://" + userdir.ProfileDirectory)
|
path := strings.ReplaceAll(userdir.ProfileDirectory, "\\", "/")
|
||||||
|
if path[0] != '/' {
|
||||||
|
path = "/" + path
|
||||||
|
}
|
||||||
|
native.OpenURL("file://" + path)
|
||||||
},
|
},
|
||||||
Style: &balance.ButtonPrimary,
|
Style: &balance.ButtonPrimary,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user