mirror of
https://github.com/clockworkpi/LauncherGoDev.git
synced 2025-12-12 16:08:52 +01:00
add realpath over abs_path
This commit is contained in:
parent
56af9a92c2
commit
6de801cd06
@ -44,6 +44,7 @@ go get -u -v github.com/cuu/LauncherGoDev
|
|||||||
* https://github.com/itchyny/volume-go
|
* https://github.com/itchyny/volume-go
|
||||||
* https://github.com/go-ini/ini
|
* https://github.com/go-ini/ini
|
||||||
* github.com/cavaliercoder/grab
|
* github.com/cavaliercoder/grab
|
||||||
|
* github.com/yookoala/realpath
|
||||||
|
|
||||||
# Create “.mpd_cpi.conf” config
|
# Create “.mpd_cpi.conf” config
|
||||||
|
|
||||||
|
|||||||
@ -12,6 +12,9 @@ import (
|
|||||||
//os/exec"
|
//os/exec"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
||||||
|
"github.com/yookoala/realpath"
|
||||||
|
|
||||||
|
|
||||||
"github.com/cuu/LauncherGoDev/sysgo/UI"
|
"github.com/cuu/LauncherGoDev/sysgo/UI"
|
||||||
"github.com/cuu/LauncherGoDev/sysgo/UI/Emulator"
|
"github.com/cuu/LauncherGoDev/sysgo/UI/Emulator"
|
||||||
"github.com/cuu/LauncherGoDev/Menu/GameShell/10_Settings"
|
"github.com/cuu/LauncherGoDev/Menu/GameShell/10_Settings"
|
||||||
@ -145,8 +148,12 @@ func ReadTheDirIntoPages(self *UI.MainScreen, _dir string, pglevel int, cur_page
|
|||||||
if strings.HasSuffix(strings.ToLower(f.Name()),UI.IconExt) {
|
if strings.HasSuffix(strings.ToLower(f.Name()),UI.IconExt) {
|
||||||
i2 := self.ExtraName(f.Name())
|
i2 := self.ExtraName(f.Name())
|
||||||
iconitem := UI.NewIconItem()
|
iconitem := UI.NewIconItem()
|
||||||
abs_path,_ := filepath.Abs(_dir+"/"+f.Name())
|
rel_path,err := realpath.Realpath( _dir+"/"+f.Name() )
|
||||||
iconitem.CmdPath = abs_path
|
if err != nil {
|
||||||
|
rel_path,_ = filepath.Abs(_dir+"/"+f.Name())
|
||||||
|
}
|
||||||
|
|
||||||
|
iconitem.CmdPath = rel_path
|
||||||
UI.MakeExecutable( iconitem.CmdPath )
|
UI.MakeExecutable( iconitem.CmdPath )
|
||||||
iconitem.MyType = UI.ICON_TYPES["EXE"]
|
iconitem.MyType = UI.ICON_TYPES["EXE"]
|
||||||
if UI.FileExists( UI.SkinMap( _dir+"/"+ UI.ReplaceSuffix(i2,"png"))) {
|
if UI.FileExists( UI.SkinMap( _dir+"/"+ UI.ReplaceSuffix(i2,"png"))) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user