|
@@ -127,18 +127,16 @@ Function Main()
|
|
|
Local root:=Prefs.MonkeyRootPath
|
|
|
If Not root Then root=AppDir()
|
|
|
|
|
|
- ' return real folder or empty string
|
|
|
- Local path:=SetupMonkeyRootPath( root,True )
|
|
|
- If Not path
|
|
|
- libc.exit_( 1 )
|
|
|
- Return
|
|
|
- Endif
|
|
|
+ root=SetupMonkeyRootPath( root,True )
|
|
|
+ If Not root libc.exit_( 1 )
|
|
|
|
|
|
- If path<>root
|
|
|
- Prefs.MonkeyRootPath=path
|
|
|
+ If root<>Prefs.MonkeyRootPath
|
|
|
+ Prefs.MonkeyRootPath=root
|
|
|
Prefs.SaveLocalState()
|
|
|
Endif
|
|
|
|
|
|
+ ChangeDir( root )
|
|
|
+
|
|
|
'load ted2 state
|
|
|
'
|
|
|
Local jobj:=JsonObject.Load( "bin/ted2.state.json" )
|
|
@@ -196,9 +194,6 @@ Function SetupMonkeyRootPath:String( rootPath:String,searchMode:Bool )
|
|
|
|
|
|
#If __DESKTOP_TARGET__
|
|
|
|
|
|
-' Not needed, and messes up default dir on first run.
|
|
|
-' ChangeDir( rootPath )
|
|
|
-
|
|
|
If searchMode
|
|
|
' search for desired folder
|
|
|
Local found:=FindBinFolder( rootPath )
|