fix assetPath on windows #354

Merged
sarah merged 4 commits from winassetPath into master 2020-10-28 23:58:16 +00:00
1 changed files with 3 additions and 1 deletions
Showing only changes of commit 27b092683a - Show all commits

View File

@ -24,6 +24,7 @@ import (
mrand "math/rand"
"os"
"os/user"
"path"
"path/filepath"
"runtime"
"time"
@ -167,7 +168,8 @@ func mainUi(flagLocal bool, flagClientUI bool) {
if runtime.GOOS == "windows" {
dir = "/" + dir
}
gcd.SetAssetPath("file://" + filepath.Join(dir, "assets") + string(filepath.Separator))
// QML uses '/' refardless of platform (so we use path.Join here not filepath.Join)
gcd.SetAssetPath("file://" + path.Join(dir, "assets") + "/")
}
log.Infof("gcd.assetPath = '%v'\n", gcd.AssetPath())