aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ethereal/qml_container.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/ethereal/qml_container.go b/ethereal/qml_container.go
index a8ce1cb75..cb43a99bd 100644
--- a/ethereal/qml_container.go
+++ b/ethereal/qml_container.go
@@ -5,6 +5,7 @@ import (
"github.com/ethereum/eth-go/ethpub"
"github.com/ethereum/eth-go/ethutil"
"github.com/go-qml/qml"
+ "runtime"
)
type QmlApplication struct {
@@ -20,7 +21,14 @@ func NewQmlApplication(path string, lib *UiLib) *QmlApplication {
}
func (app *QmlApplication) Create() error {
- component, err := app.engine.LoadFile(app.path)
+ path := string(app.path)
+
+ // For some reason for windows we get /c:/path/to/something, windows doesn't like the first slash but is fine with the others so we are removing it
+ if string(app.path[0]) == "/" && runtime.GOOS == "windows" {
+ path = app.path[1:]
+ }
+
+ component, err := app.engine.LoadFile(path)
if err != nil {
logger.Warnln(err)
}