@@ -16,6 +16,7 @@ const colNav2 = theme.text6
1616const menu_gap = -(char_w / 2 )
1717const is_android = instr(sbver, "Android" ) != 0
1818const is_sdl = instr(sbver, "SDL" ) != 0
19+ const path_sep = iff(instr(sbver, "Win_" ) != 0 , "\\" , "/" )
1920const onlineUrl = "http://smallbasic.github.io/samples/index.bas"
2021const idxEdit = 6
2122const idxFiles = 7
@@ -321,7 +322,7 @@ sub listFiles(byref frm, path, sortDir, byref basList)
321322 local date_col = colNav
322323
323324 sub fix_path
324- if (right(path, 1 ) != "/" ) then path += "/"
325+ if (right(path, 1 ) != path_sep ) then path += path_sep
325326 end
326327
327328 fix_path
@@ -679,17 +680,19 @@ sub main
679680 sub go_back
680681 local backPath, index
681682 backPath = ""
682- index = iff(isstring(path), rinstr(path, "/" ), 0 )
683+ index = iff(isstring(path), rinstr(path, path_sep ), 0 )
683684 if (index > 0 && index == len(path)) then
684- index = rinstr(left(path, index - 1 ), "/" )
685- fi
685+ index = rinstr(left(path, index - 1 ), path_sep )
686+ endif
686687 if (index == 1 ) then
687688 index++
688- fi
689+ endif
689690 if (index > 0 )
690691 backPath = left(path, index - 1 )
692+ else if (mid(path, 2 , 1 ) == ":" ) then
693+ backPath = path
691694 else
692- backPath = "/"
695+ backPath = path_sep
693696 endif
694697 path = backPath
695698 end
0 commit comments