Skip to content

Commit

Permalink
Fixed a few wrong method calls in GemRB.java.
Browse files Browse the repository at this point in the history
  • Loading branch information
peschwa committed Jul 9, 2013
1 parent 616d2bc commit 07c6aa6
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions android/GemRB.java
Expand Up @@ -49,9 +49,9 @@ protected void onCreate(Bundle savedInstanceState) {
Log.d("GemRB Activity", "Checking GemRB.cfg content.");

File finalConfFile = new File(gemrbHomeFolder.getAbsolutePath().concat(gemrbHomeFolder.separator).concat("GemRB.cfg"));
File userSuppliedConfig = new File(Environment.getExternalStoragePath().concat(gemrbHomeFolder.separator).concat("GemRB.cfg"));
File userSuppliedConfig = new File(Environment.getExternalStorageDirectory().concat(gemrbHomeFolder.separator).concat("GemRB.cfg"));

if(!finalConfFile.exists() && !userSuppliedConfig.exists()) {
if(!finalConfFile.exists()) {
Log.d("GemRB Activity", "GemRB.cfg doesn't exist in the expected location, creating it from the packaged template.");

// String[] keysToChange = { "GUIScriptsPath", "GemRBOverridePath", "GemRBUnhardcodedPath" };
Expand All @@ -76,20 +76,6 @@ protected void onCreate(Bundle savedInstanceState) {
} catch (IOException e) {
throw new RuntimeException(e);
}
} else if (!finalConfFile.exists() && userSuppliedConfig.exists()) {
BufferedReader inConf = new BufferedReader(new FileReader(userSuppliedConfig));
File outConfFile = new File(gemrbHomeFolder.getAbsolutePath().concat(gemrbHomeFolder.separator).concat("GemRB.cfg"));
BufferedWriter outConf = new BufferedWriter(new FileWriter(outConfFile));

String line;

while((line = inConf.readLine()) != null) {
outConf.write(line.concat("\n"));
outConf.flush();
}
inConf.close();
outConf.flush();
outConf.close();
}

super.onCreate(savedInstanceState);
Expand Down

0 comments on commit 07c6aa6

Please sign in to comment.