mirror of https://github.com/Wox-launcher/Wox
refactor(ui): improve path display #4222
* Updated path handling in the `manager.go` file to use `filepath` instead of `path`. * This change ensures better compatibility across different operating systems.
This commit is contained in:
parent
282745707c
commit
093088771c
|
@ -7,7 +7,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/url"
|
"net/url"
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
"wox/common"
|
"wox/common"
|
||||||
|
@ -143,7 +143,7 @@ func (m *Manager) Start(ctx context.Context) error {
|
||||||
util.Go(ctx, "watch embed themes", func() {
|
util.Go(ctx, "watch embed themes", func() {
|
||||||
workingDirectory, wdErr := os.Getwd()
|
workingDirectory, wdErr := os.Getwd()
|
||||||
if wdErr == nil {
|
if wdErr == nil {
|
||||||
util.WatchDirectoryChanges(ctx, path.Join(workingDirectory, "resource", "ui", "themes"), onThemeChange)
|
util.WatchDirectoryChanges(ctx, filepath.Join(workingDirectory, "resource", "ui", "themes"), onThemeChange)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -640,16 +640,16 @@ func (m *Manager) ChangeUserDataDirectory(ctx context.Context, newDirectory stri
|
||||||
dstPath string
|
dstPath string
|
||||||
}{
|
}{
|
||||||
{
|
{
|
||||||
srcPath: path.Join(oldDirectory, "plugins"),
|
srcPath: filepath.Join(oldDirectory, "plugins"),
|
||||||
dstPath: path.Join(newDirectory, "plugins"),
|
dstPath: filepath.Join(newDirectory, "plugins"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
srcPath: path.Join(oldDirectory, "settings"),
|
srcPath: filepath.Join(oldDirectory, "settings"),
|
||||||
dstPath: path.Join(newDirectory, "settings"),
|
dstPath: filepath.Join(newDirectory, "settings"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
srcPath: path.Join(oldDirectory, "themes"),
|
srcPath: filepath.Join(oldDirectory, "themes"),
|
||||||
dstPath: path.Join(newDirectory, "themes"),
|
dstPath: filepath.Join(newDirectory, "themes"),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue