Browse Source

add Abs path

cuu 5 years ago
parent
commit
56af9a92c2
1 changed files with 2 additions and 1 deletions
  1. 2 1
      mainscreen.go

+ 2 - 1
mainscreen.go

@@ -145,7 +145,8 @@ 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()
-				iconitem.CmdPath = _dir+"/"+f.Name()
+        abs_path,_ := filepath.Abs(_dir+"/"+f.Name())
+				iconitem.CmdPath = abs_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"))) {