improve path processing

This commit is contained in:
josc146 2024-02-03 15:13:24 +08:00
parent b077f1fe42
commit e07f0fa6e3
2 changed files with 2 additions and 1 deletions

View File

@ -48,6 +48,7 @@ func (a *App) OnStartup(ctx context.Context) {
a.exDir = filepath.Dir(ex) + "/"
a.cmdPrefix = "cd " + a.exDir + " && "
}
os.Chdir(a.exDir)
}
os.Chmod(a.exDir+"backend-rust/webgpu_server", 0777)

View File

@ -18,7 +18,7 @@ func (a *App) GetAbsPath(path string) (string, error) {
var absPath string
var err error
if filepath.IsAbs(path) {
absPath = path
absPath = filepath.Clean(path)
} else {
absPath, err = filepath.Abs(filepath.Join(a.exDir, path))
if err != nil {