improve path processing
This commit is contained in:
parent
b077f1fe42
commit
e07f0fa6e3
@ -48,6 +48,7 @@ func (a *App) OnStartup(ctx context.Context) {
|
|||||||
a.exDir = filepath.Dir(ex) + "/"
|
a.exDir = filepath.Dir(ex) + "/"
|
||||||
a.cmdPrefix = "cd " + a.exDir + " && "
|
a.cmdPrefix = "cd " + a.exDir + " && "
|
||||||
}
|
}
|
||||||
|
os.Chdir(a.exDir)
|
||||||
}
|
}
|
||||||
|
|
||||||
os.Chmod(a.exDir+"backend-rust/webgpu_server", 0777)
|
os.Chmod(a.exDir+"backend-rust/webgpu_server", 0777)
|
||||||
|
@ -18,7 +18,7 @@ func (a *App) GetAbsPath(path string) (string, error) {
|
|||||||
var absPath string
|
var absPath string
|
||||||
var err error
|
var err error
|
||||||
if filepath.IsAbs(path) {
|
if filepath.IsAbs(path) {
|
||||||
absPath = path
|
absPath = filepath.Clean(path)
|
||||||
} else {
|
} else {
|
||||||
absPath, err = filepath.Abs(filepath.Join(a.exDir, path))
|
absPath, err = filepath.Abs(filepath.Join(a.exDir, path))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user