File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/main/java/com/neuronrobotics/bowlerstudio/assets Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 1818import com .google .gson .GsonBuilder ;
1919import com .google .gson .reflect .TypeToken ;
2020import com .neuronrobotics .bowlerstudio .IssueReportingExceptionHandler ;
21+ import com .neuronrobotics .bowlerstudio .scripting .DownloadManager ;
2122import com .neuronrobotics .bowlerstudio .scripting .IGithubLoginListener ;
2223import com .neuronrobotics .bowlerstudio .scripting .PasswordManager ;
2324import com .neuronrobotics .bowlerstudio .scripting .ScriptingEngine ;
@@ -165,7 +166,10 @@ public static void getDatabase() {
165166 File loadFile = loadFile ();
166167 if (loadFile .exists ())
167168 try {
168- Object inlineFileScriptRun = ScriptingEngine .inlineFileScriptRun (new CSGDatabaseInstance (new File ("CSGdatabase.json" )),loadFile , null );
169+ File parent =loadFile .getParentFile ();
170+ File db = new File (parent .getAbsolutePath ()+DownloadManager .delim ()+"CSGdatabase.json" );
171+ CSGDatabaseInstance instance = new CSGDatabaseInstance (db );
172+ Object inlineFileScriptRun = ScriptingEngine .inlineFileScriptRun (instance ,loadFile , null );
169173 database = Collections .synchronizedMap ((HashMap <String , HashMap <String , Object >>) inlineFileScriptRun );
170174
171175 } catch (Exception e ) {
You can’t perform that action at this time.
0 commit comments