Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed a few wrong method calls in GemRB.java.

  • Loading branch information...
commit 07c6aa673984e012ca6c2442f6ae37d13103a7e0 1 parent 616d2bc
@peschwa peschwa authored
Showing with 2 additions and 16 deletions.
  1. +2 −16 android/GemRB.java
View
18 android/GemRB.java
@@ -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" };
@@ -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);
Please sign in to comment.
Something went wrong with that request. Please try again.